Robot's source code

Dependencies:   mbed

Revision:
108:890094ee202a
Parent:
106:05096985d1b2
Child:
110:7e71e5cd8197
--- a/main.cpp	Tue May 05 05:05:07 2015 +0000
+++ b/main.cpp	Tue May 05 16:35:42 2015 +0000
@@ -215,16 +215,27 @@
             #endif
         }
     #else
-        asserv.setGoal(1,500,0);
-        /*wait(2);
-        asserv.setGoal(-450,1,0);
-        wait(2);
-        asserv.setGoal(-450,-450,0);
-        wait(2);
-        asserv.setGoal(1,-450,0);
-        wait(2);
-        asserv.setGoal(450,-450,0);
-        wait(2);*/
+        asserv.setGoal(1,300,0);
+        logger.printf("Attente\r\n");
+        while(!asserv.isArrived())wait(0.1);
+        logger.printf("Arrivé\r\n");
+        wait(1);
+        asserv.setGoal(-300,300,0);
+        while(!asserv.isArrived())wait(0.1);
+        wait(1);
+        asserv.setGoal(-300,-1,0);
+        while(!asserv.isArrived())wait(0.1);
+        wait(1);
+        asserv.setGoal(-300,-300,0);
+        while(!asserv.isArrived())wait(0.1);
+        wait(1);
+        asserv.setGoal(1,-300,0);
+        while(!asserv.isArrived())wait(0.1);
+        wait(1);
+        asserv.setGoal(300,-300,0);
+        while(!asserv.isArrived())wait(0.1);
+        wait(1);
+        asserv.setGoal(0,0,0);
     #endif
     
     while(1);