David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: main.cpp
- Revision:
- 34:6c84680d823a
- Parent:
- 33:58a0ab6e9ad2
- Child:
- 37:23000a47ed2b
--- 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) {