Drive wheeled robot platform

Dependencies:   mbed

Fork of mbed_blinky by Mbed

Files at this revision

API Documentation at this revision

Comitter:
RichardAmes
Date:
Mon Sep 25 22:50:24 2017 +0000
Parent:
8:840b3b80cfa2
Commit message:
initial check in

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 840b3b80cfa2 -r ada1a8a81354 main.cpp
--- a/main.cpp	Mon May 22 21:17:29 2017 +0000
+++ b/main.cpp	Mon Sep 25 22:50:24 2017 +0000
@@ -59,19 +59,18 @@
 }
 
 int main()
-{    
+{
+    int i;
+        
     drive_init();
     
-    move(0, 0, 500);
-    move(40, 40, 500);
-    move(0, 100, 300);
-    move(40, 40, 500);
-    move(0, 100, 300);
-    move(40, 40, 500);
-    move(0, 100, 300);
-    move(40, 40, 500);
-    move(0, 100, 300);
-
+    for (i = 0; i < 4; i++)
+    {
+        move(0, 0, 500);
+        move(-50, 50, 1000);
+        move(0, 0, 500);
+        move(50, -50, 1000);
+    }
     while(1)
     {
         move(0, 0, 500);