This is some awesome robot code
Dependencies: mbed-rtos mbed QEI
Fork of ICRSEurobot13 by
Diff: Sensors/Colour/Phototransistor.h
- Revision:
- 3:717de74f6ebd
- Child:
- 4:1be0f6c6ceae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensors/Colour/Phototransistor.h Mon Apr 01 15:33:48 2013 +0000 @@ -0,0 +1,21 @@ +#ifndef __Phototransistor_h__ +#define __Phototransistor_h__ + + +// Eurobot13 Phototransistor.h + +class Phototransistor{ + private: + AnalogIn ain; + + public: + Phototransistor(PinName analogInPin) + : ain (analogInPin) + { } + + float read() {return ain.read();} + operator float() {return read();} + +}; + +#endif