David's line following code from the LVBots competition, 2015.
Dependencies: GeneralDebouncer Pacer PololuEncoder mbed
Fork of DeadReckoning by
main.h@33:58a0ab6e9ad2, 2014-03-05 (annotated)
- Committer:
- DavidEGrayson
- Date:
- Wed Mar 05 02:50:09 2014 +0000
- Revision:
- 33:58a0ab6e9ad2
- Parent:
- 32:83a13b06093c
- Child:
- 37:23000a47ed2b
Bunch of stuff. Then reduced drivingSpeed to 400.
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 | 28:4374035df5e0 | 6 | void loadCalibration(); |
DavidEGrayson | 28:4374035df5e0 | 7 | |
DavidEGrayson | 21:c279c6a83671 | 8 | void waitForSignalToStart(); |
DavidEGrayson | 28:4374035df5e0 | 9 | void findLineAndCalibrate(); void findLine(); // two alternatives |
DavidEGrayson | 21:c279c6a83671 | 10 | void turnRightToFindLine(); |
DavidEGrayson | 21:c279c6a83671 | 11 | void followLineToEnd(); |
DavidEGrayson | 21:c279c6a83671 | 12 | void driveHomeAlmost(); |
DavidEGrayson | 21:c279c6a83671 | 13 | void finalSettleIn(); |
DavidEGrayson | 21:c279c6a83671 | 14 | |
DavidEGrayson | 28:4374035df5e0 | 15 | void updateMotorsToFollowLine(); |
DavidEGrayson | 21:c279c6a83671 | 16 | void updateReckonerFromEncoders(); |
DavidEGrayson | 33:58a0ab6e9ad2 | 17 | void setLeds(bool v1, bool v2, bool v3, bool v4); |
DavidEGrayson | 21:c279c6a83671 | 18 | float determinant(); |
DavidEGrayson | 21:c279c6a83671 | 19 | float dotProduct(); |
DavidEGrayson | 33:58a0ab6e9ad2 | 20 | float magnitude(); |
DavidEGrayson | 21:c279c6a83671 | 21 | |
DavidEGrayson | 21:c279c6a83671 | 22 | extern Reckoner reckoner; |
DavidEGrayson | 21:c279c6a83671 | 23 | extern LineTracker lineTracker; |