Robot's source code
Dependencies: mbed
Diff: main.cpp
- Revision:
- 54:e0e58c36658a
- Parent:
- 48:cb3ebbc27db3
- Child:
- 55:2d75c0a0375b
--- a/main.cpp Fri Mar 27 19:49:22 2015 +0000 +++ b/main.cpp Thu Apr 09 14:06:46 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};