Putty-Ausgabe
Dependencies: mbed
Diff: IRSensor.h
- Revision:
- 0:fb3f7c677c18
- Child:
- 1:fc836343f42b
diff -r 000000000000 -r fb3f7c677c18 IRSensor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IRSensor.h Thu Apr 13 08:30:35 2017 +0000 @@ -0,0 +1,26 @@ +#ifndef IR_SENSOR_H +#define IR_SENSOR_H + +#include <cstdlib> //-> Nötig? +#include "mbed.h" + +//E. Hess +//IRSensor.h + +class IRSensor { + public: + IRSensor(); + IRSensor(AnalogIn* distance, DigitalOut* bit0, DigitalOut* bit1, DigitalOut* bit2, int number); + ~IRSensor(); + void init(AnalogIn* distance, DigitalOut* bit0, DigitalOut* bit1, DigitalOut* bit2, int number); + float read(); + + private: + AnalogIn* distance; + DigitalOut* bit0; + DigitalOut* bit1; + DigitalOut* bit2; + int number; +}; + +#endif \ No newline at end of file