David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: test.cpp
- Revision:
- 8:78b1ff957cba
- Child:
- 9:9734347b5756
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.cpp Sat Feb 22 02:23:21 2014 +0000 @@ -0,0 +1,40 @@ +// A file for testing routines that will not be used in the final firmware. + +#include <mbed.h> +#include "motors.h" +#include "leds.h" +#include "pc_serial.h" + +void testMotors() +{ + led1 = 1; + led2 = 0; + led3 = 0; + while(1) + { + motors_speed_set(0, 0); + led2 = 0; + led3 = 0; + wait(2); + + motors_speed_set(300, 300); + wait(2); + + motors_speed_set(-300, 300); + wait(2); + + motors_speed_set(0, 0); + led2 = 1; + wait(2); + + motors_speed_set(600, 600); + wait(2); + + motors_speed_set(0, 0); + led3 = 1; + wait(2); + + motors_speed_set(1200, 1200); + wait(2); + } +} \ No newline at end of file