Scanner code will include the following: obstacle avoidance, hunting for victims, and localization checks.
scanner.h
- Committer:
- j_j205
- Date:
- 2016-02-17
- Revision:
- 0:999bb8fcd0b2
- Child:
- 1:2714d60284ef
- Child:
- 2:b281034eda86
File content as of revision 0:999bb8fcd0b2:
#ifndef SCANNER_H #define SCANNER_H #include "mbed.h" #include "Gp2x.h" #include "VL6180x.h" class Scanner { public: Scanner(Serial &pc1, PinName _servoL, PinName _servoR, VL6180x &_shortRangeL, VL6180x &_shortRangeR, Gp2x &_longRangeL, Gp2x &_longRangeR, float _period); int hunt(); int avoid(); int localize(); private: Serial &pc; PwmOut servoL; PwmOut servoR; VL6180x &shortRangeL; VL6180x &shortRangeR; Gp2x &longRangeL; Gp2x &longRangeR; float period; Ticker pit; // periodic interrupt timer void scan(); }; #endif // SCANNER_H