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
encoders.h@27:2456f68be679, 2014-03-01 (annotated)
- Committer:
- DavidEGrayson
- Date:
- Sat Mar 01 01:46:35 2014 +0000
- Revision:
- 27:2456f68be679
- Parent:
- 12:835a4d24ae3b
Fixed a major bug in the line following (reduceSpeed return value was not used). Made finalSettleIn better by adding an integral term and increasing the settleSpeed from 200 to 300.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DavidEGrayson | 8:78b1ff957cba | 1 | #pragma once |
DavidEGrayson | 8:78b1ff957cba | 2 | |
DavidEGrayson | 8:78b1ff957cba | 3 | #include <PololuEncoder.h> |
DavidEGrayson | 8:78b1ff957cba | 4 | |
DavidEGrayson | 12:835a4d24ae3b | 5 | #define ENCODER_LEFT 0x00 |
DavidEGrayson | 12:835a4d24ae3b | 6 | #define ENCODER_RIGHT 0x01 |
DavidEGrayson | 8:78b1ff957cba | 7 | |
DavidEGrayson | 8:78b1ff957cba | 8 | extern PololuEncoderBuffer encoderBuffer; |
DavidEGrayson | 9:9734347b5756 | 9 | extern PololuEncoder encoderLeft, encoderRight; |
DavidEGrayson | 8:78b1ff957cba | 10 | |
DavidEGrayson | 9:9734347b5756 | 11 | void encodersInit(); |