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:
Sun Jul 28 22:20:12 2019 +0000
Revision:
46:df2c2d25c070
Parent:
43:0e985a58f174
Some minor changes.  The overall dead reckoning is working now, but I don't think I did much to fix it.

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