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

Committer:
DavidEGrayson
Date:
Thu Mar 13 17:49:43 2014 +0000
Revision:
38:5e93a479c244
Parent:
37:23000a47ed2b
Child:
42:96671b71aac5
The final version of the code that was used for the competition.;

Who changed what in which revision?

UserRevisionLine numberNew 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 37:23000a47ed2b 5 #include "logger.h"
DavidEGrayson 21:c279c6a83671 6
DavidEGrayson 28:4374035df5e0 7 void loadCalibration();
DavidEGrayson 28:4374035df5e0 8
DavidEGrayson 21:c279c6a83671 9 void waitForSignalToStart();
DavidEGrayson 28:4374035df5e0 10 void findLineAndCalibrate(); void findLine(); // two alternatives
DavidEGrayson 21:c279c6a83671 11 void turnRightToFindLine();
DavidEGrayson 21:c279c6a83671 12 void followLineToEnd();
DavidEGrayson 21:c279c6a83671 13 void driveHomeAlmost();
DavidEGrayson 21:c279c6a83671 14 void finalSettleIn();
DavidEGrayson 37:23000a47ed2b 15 void __attribute__((noreturn)) loggerReportLoop();
DavidEGrayson 21:c279c6a83671 16
DavidEGrayson 28:4374035df5e0 17 void updateMotorsToFollowLine();
DavidEGrayson 21:c279c6a83671 18 void updateReckonerFromEncoders();
DavidEGrayson 33:58a0ab6e9ad2 19 void setLeds(bool v1, bool v2, bool v3, bool v4);
DavidEGrayson 21:c279c6a83671 20 float determinant();
DavidEGrayson 21:c279c6a83671 21 float dotProduct();
DavidEGrayson 33:58a0ab6e9ad2 22 float magnitude();
DavidEGrayson 37:23000a47ed2b 23 void loggerService();
DavidEGrayson 21:c279c6a83671 24
DavidEGrayson 21:c279c6a83671 25 extern Reckoner reckoner;
DavidEGrayson 21:c279c6a83671 26 extern LineTracker lineTracker;
DavidEGrayson 37:23000a47ed2b 27 extern Logger logger;