![](/media/cache/profiles/ebb9a55061af33b68d38f7ce72e4460f.50x50_q85.jpg)
David's dead reckoning code for the LVBots competition on March 6th. Uses the mbed LPC1768, DRV8835, QTR-3RC, and two DC motors with encoders.
Dependencies: PololuEncoder Pacer mbed GeneralDebouncer
Diff: main.cpp
- Revision:
- 38:5e93a479c244
- Parent:
- 37:23000a47ed2b
- Child:
- 39:b19dfc5d4d4b
diff -r 23000a47ed2b -r 5e93a479c244 main.cpp --- a/main.cpp Thu Mar 06 05:11:46 2014 +0000 +++ b/main.cpp Thu Mar 13 17:49:43 2014 +0000 @@ -183,8 +183,13 @@ while(!button1DefinitelyPressed()) { updateReckonerFromEncoders(); - } + } reckoner.reset(); + while(button1DefinitelyPressed()) + { + updateReckonerFromEncoders(); + } + wait(0.2); } // Keep the robot pointing the in the right direction (1, 0).