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

Committer:
DavidEGrayson
Date:
14 months ago
Revision:
48:597738b77f77
Parent:
46:df2c2d25c070

File content as of revision 48:597738b77f77:

#pragma once

#include "reckoner.h"
#include "line_tracker.h"
#include "logger.h"
#include "turn_sensor.h"

void loadLineCalibration();
void doGyroCalibration();

void waitForSignalToStart();
void findLineAndCalibrate(); void findLine();  // two alternatives
void followLineToEnd();
void driveHomeAlmost();
void finalSettleIn();
void __attribute__((noreturn)) loggerReportLoop();

void updateMotorsToFollowLine();
void updateReckoner();
void setLeds(bool v1, bool v2, bool v3, bool v4);
float determinant();
float dotProduct();
float magnitude();
void loggerService();

extern Reckoner reckoner;
extern LineTracker lineTracker;
extern TurnSensor turnSensor;
extern Logger logger;