Robot's source code

Dependencies:   mbed

Revision:
55:2d75c0a0375b
Parent:
53:eca003fcc800
Parent:
54:e0e58c36658a
Child:
56:eb0600022463
diff -r eca003fcc800 -r 2d75c0a0375b main.cpp
--- a/main.cpp	Tue Apr 07 18:50:05 2015 +0000
+++ b/main.cpp	Thu Apr 09 14:07:14 2015 +0000
@@ -58,7 +58,17 @@
     logger.printf("mise a jour des pwm.\r\n");
     Timer t;
     
-    AX12 test(PA_9,NC,0x05,250000);
+    AX12 test(PA_9,NC,0x03,250000);
+    test.SetMode(0); // Position
+    
+    while(1)
+    {
+        test.SetGoal(0);
+        wait(1);
+        test.SetGoal(90);
+        wait(1);
+    }
+    
     AnalogIn ain0(PA_0);
     AnalogIn ain1(PA_1);
     AnalogIn ain2(PA_4);
@@ -72,7 +82,7 @@
     Odometry odometry(&qei_left,&qei_right,63/2.,63/2.,280);
     DigitalOut led(LED1);
     
-    test.SetMode(0); // Position
+    
     
     /*char dataOff[] = {0};
     char dataOn[] = {1};