David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: main.cpp
- Revision:
- 5:01ad080dc4fa
- Parent:
- 4:1b20a11765c8
- Child:
- 6:89a39870e23d
diff -r 1b20a11765c8 -r 01ad080dc4fa main.cpp --- a/main.cpp Thu Feb 20 22:59:28 2014 +0000 +++ b/main.cpp Thu Feb 20 23:30:53 2014 +0000 @@ -34,9 +34,9 @@ motors_init(); - motors_speed_set(5, 55); + motors_speed_set(5, 45); - Pacer reportPacer(250000); + Pacer reportPacer(500000); Pacer blinkPacer(200000); uint32_t eventCount = 0; uint32_t count = 0; @@ -63,9 +63,7 @@ if(reportPacer.pace()) { led2 = 1; - char str[80]; - sprintf(str, "%8x %8x %8x\n", encoder1.getCount(), count, eventCount); - pc.puts(str); + pc.printf("%8x\n", LPC_PWM1->MCR); led2 = 0; }