DP
Dependencies: FastAnalogIn mbed-rtos mbed
Diff: ledsensor.h
- Revision:
- 0:f3b355df6f26
diff -r 000000000000 -r f3b355df6f26 ledsensor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ledsensor.h Sun Apr 26 13:14:02 2015 +0000 @@ -0,0 +1,34 @@ +#ifndef _ANGLE_H +#define _ANGLE_H + +#include "mbed.h" +#include "rtos.h" +#include "FastAnalogIn.h" + +class cLedSensor { + public: + /* Constructor */ + cLedSensor(PinName pinAnalog); + + /* Desctructor*/ + ~cLedSensor(); + + /* Get analog value of voltage */ + float getVoltage(); + + /* This method reads analog value */ + void read(); + + /* Pointer to collect thread */ + Thread* thread; + + private: + /*Fast analogIn pin*/ + FastAnalogIn analog; + + float voltage; + float volt_s[5]; + float volt_temp; + int i; +}; +#endif \ No newline at end of file