![](/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:
- 34:6c84680d823a
- Parent:
- 33:58a0ab6e9ad2
- Child:
- 37:23000a47ed2b
diff -r 58a0ab6e9ad2 -r 6c84680d823a main.cpp --- a/main.cpp Wed Mar 05 02:50:09 2014 +0000 +++ b/main.cpp Wed Mar 05 04:38:45 2014 +0000 @@ -41,7 +41,7 @@ //testLineSensors(); //testReckoner(); //testButtons(); - testDriveHome(); + //testDriveHome(); //testFinalSettleIn(); //testCalibrate(); //testLineFollowing(); @@ -184,7 +184,7 @@ void updateMotorsToFollowLine() { - const int followLineStrength = drivingSpeed; + const int followLineStrength = drivingSpeed * 5 / 4; int16_t speedLeft = drivingSpeed; int16_t speedRight = drivingSpeed; @@ -243,7 +243,7 @@ timer.start(); GeneralDebouncer lineStatus(10000); - const uint32_t lineDebounceTime = 100000; + const uint32_t lineDebounceTime = 1000000; while(1) {