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: encoders.cpp
- Revision:
- 39:b19dfc5d4d4b
- Parent:
- 12:835a4d24ae3b
--- a/encoders.cpp Thu Mar 13 17:49:43 2014 +0000 +++ b/encoders.cpp Thu Jul 25 02:11:25 2019 +0000 @@ -1,9 +1,9 @@ #include "encoders.h" -const PinName encoderPinLeftA = p6, // Gray wire - encoderPinLeftB = p7, // White wire - encoderPinRightA = p30, // White wire - encoderPinRightB = p29; // Gray wire +const PinName encoderPinLeftA = p6, // White wire + encoderPinLeftB = p7, // Yellow wire + encoderPinRightA = p30, // Yellow wire + encoderPinRightB = p29; // White wire PololuEncoderBuffer encoderBuffer; PololuEncoder encoderLeft(encoderPinLeftA, encoderPinLeftB, &encoderBuffer, ENCODER_LEFT);