![](/media/cache/profiles/ebb9a55061af33b68d38f7ce72e4460f.50x50_q85.jpg)
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
line_tracker.h
- Committer:
- DavidEGrayson
- Date:
- 2014-02-27
- Revision:
- 21:c279c6a83671
- Child:
- 22:44c032e59ff5
File content as of revision 21:c279c6a83671:
#pragma once #include "line_sensors.h" class LineTracker { public: LineTracker(); void updateCalibration(); void read(); bool getLineVisible(); uint16_t getLinePosition(); uint16_t rawValues[LINE_SENSOR_COUNT]; uint16_t calibratedValues[LINE_SENSOR_COUNT]; uint16_t calibratedMaximum[LINE_SENSOR_COUNT]; uint16_t calibratedMinimum[LINE_SENSOR_COUNT]; private: void readRawValues(); void updateCalibratedValues(); void updateLineStatus(); bool lineVisible; uint16_t linePosition; };