David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
Diff: motors.cpp
- Revision:
- 40:e79cefc241f8
- Parent:
- 32:83a13b06093c
--- a/motors.cpp Tue Apr 14 01:06:41 2015 +0000 +++ b/motors.cpp Tue Apr 14 01:45:01 2015 +0000 @@ -62,7 +62,6 @@ { motorLeftDir = 1; } - LPC_PWM1->MR1 = motorLeftSpeed; if (motorRightSpeed < 0) { @@ -73,6 +72,7 @@ { motorRightDir = 1; } + LPC_PWM1->MR1 = motorLeftSpeed; LPC_PWM1->MR3 = motorRightSpeed; LPC_PWM1->LER |= (1<<1) | (1<<3);