3/26/16 12:25 am JJ
Dependents: steppertest R5 2016 Robotics Team 1
Fork of scanner by
Diff: scanner.h
- Revision:
- 0:999bb8fcd0b2
- Child:
- 1:2714d60284ef
- Child:
- 2:b281034eda86
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scanner.h Wed Feb 17 16:47:55 2016 +0000 @@ -0,0 +1,33 @@ +#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 \ No newline at end of file