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
main.h@21:c279c6a83671, 2014-02-27 (annotated)
- Committer:
- DavidEGrayson
- Date:
- Thu Feb 27 23:20:34 2014 +0000
- Revision:
- 21:c279c6a83671
- Parent:
- 13:bba5b3abd13f
- Child:
- 22:44c032e59ff5
Wrote a whole bunch of code that could theoretically allow the robot to compete, but it has not been tested at all yet.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
DavidEGrayson | 21:c279c6a83671 | 1 | #pragma once |
DavidEGrayson | 21:c279c6a83671 | 2 | |
DavidEGrayson | 21:c279c6a83671 | 3 | #include "reckoner.h" |
DavidEGrayson | 21:c279c6a83671 | 4 | #include "line_tracker.h" |
DavidEGrayson | 21:c279c6a83671 | 5 | |
DavidEGrayson | 21:c279c6a83671 | 6 | void waitForSignalToStart(); |
DavidEGrayson | 21:c279c6a83671 | 7 | void findLineAndCalibrate(); |
DavidEGrayson | 21:c279c6a83671 | 8 | void turnRightToFindLine(); |
DavidEGrayson | 21:c279c6a83671 | 9 | void followLineToEnd(); |
DavidEGrayson | 21:c279c6a83671 | 10 | void driveHomeAlmost(); |
DavidEGrayson | 21:c279c6a83671 | 11 | void finalSettleIn(); |
DavidEGrayson | 21:c279c6a83671 | 12 | |
DavidEGrayson | 21:c279c6a83671 | 13 | void updateReckonerFromEncoders(); |
DavidEGrayson | 21:c279c6a83671 | 14 | float determinant(); |
DavidEGrayson | 21:c279c6a83671 | 15 | float dotProduct(); |
DavidEGrayson | 21:c279c6a83671 | 16 | |
DavidEGrayson | 21:c279c6a83671 | 17 | extern Reckoner reckoner; |
DavidEGrayson | 21:c279c6a83671 | 18 | extern LineTracker lineTracker; |