![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Сбор информации о погодных условиях
Dependencies: RF24 USBDevice mbed
Diff: Sensors/ThermometerTmp36.h
- Revision:
- 4:7cd67d988145
- Parent:
- 2:ad2653bcf93f
- Child:
- 6:db4538895ae7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Sensors/ThermometerTmp36.h Wed Oct 28 20:50:56 2015 +0000 @@ -0,0 +1,29 @@ +#ifndef ThermometerTMP36_H +#define ThermometerTMP36_H + +#include "mbed.h" +/** +* Reads the data from the sensor TMP36, +* connected to the analog input and converts them to Celsius +*/ +class ThermometerTmp36{ +public: + /** + * Constructor + * + * @param inputChanel The analog input is connected to the sensor + */ + ThermometerTmp36(AnalogIn inputChanel):input(inputChanel){} + + /** + * The temperature in degrees Celsius + * + * @returns Temperature + */ + double getTemperature(); + +private: + AnalogIn input; +}; + +#endif \ No newline at end of file