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:
Sat Mar 01 03:13:57 2014 +0000
Revision:
28:4374035df5e0
Parent:
24:fc01d9125d3b
Child:
32:83a13b06093c
Discovered that 4 out of the 6 analog inputs on the mbed are severely messed up.  Might need to get a new mbed or do digital filtering (a median of three readings out to work).

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 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 21:c279c6a83671 17 float determinant();
DavidEGrayson 21:c279c6a83671 18 float dotProduct();
DavidEGrayson 22:44c032e59ff5 19 bool calibrationLooksGood();
DavidEGrayson 21:c279c6a83671 20
DavidEGrayson 21:c279c6a83671 21 extern Reckoner reckoner;
DavidEGrayson 21:c279c6a83671 22 extern LineTracker lineTracker;