Helvijs Kiselis
/
Micromouse
Algorithmus
IRSensor.h@10:84534846e1f1, 2018-04-30 (annotated)
- Committer:
- luethale
- Date:
- Mon Apr 30 13:28:28 2018 +0000
- Revision:
- 10:84534846e1f1
- Parent:
- 1:2b5f79285a3e
Clean up; volatile for; route[]; junction[]; j
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Helvis | 1:2b5f79285a3e | 1 | #ifndef IR_SENSOR_H_ |
Helvis | 1:2b5f79285a3e | 2 | #define IR_SENSOR_H_ |
Helvis | 1:2b5f79285a3e | 3 | |
Helvis | 1:2b5f79285a3e | 4 | #include <cstdlib> |
Helvis | 1:2b5f79285a3e | 5 | #include <mbed.h> |
Helvis | 1:2b5f79285a3e | 6 | |
Helvis | 1:2b5f79285a3e | 7 | class IRSensor { |
Helvis | 1:2b5f79285a3e | 8 | |
Helvis | 1:2b5f79285a3e | 9 | public: |
Helvis | 1:2b5f79285a3e | 10 | IRSensor (AnalogIn& distance); |
Helvis | 1:2b5f79285a3e | 11 | |
Helvis | 1:2b5f79285a3e | 12 | virtual ~IRSensor(); |
Helvis | 1:2b5f79285a3e | 13 | float readL(); |
Helvis | 1:2b5f79285a3e | 14 | float readR(); |
Helvis | 1:2b5f79285a3e | 15 | float readC(); |
Helvis | 1:2b5f79285a3e | 16 | float readB(); |
Helvis | 1:2b5f79285a3e | 17 | private: |
Helvis | 1:2b5f79285a3e | 18 | AnalogIn& distance; |
Helvis | 1:2b5f79285a3e | 19 | }; |
Helvis | 1:2b5f79285a3e | 20 | |
luethale | 10:84534846e1f1 | 21 | #endif /* IR_SENSOR H */ |