Temperature library for the full project.
Diff: Temp_Sensor.h
- Revision:
- 0:a42f4353261f
- Child:
- 1:fc58ae197a88
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Temp_Sensor.h Sat Dec 05 07:31:46 2015 +0000 @@ -0,0 +1,16 @@ +#include "main.h" + +#define ADC_CONVERSION 3.3/5.0 + +#ifndef _TEMP_SENSOR +#define _TEMP_SENSOR + +class Temp_Sensor { + public: + Temp_Sensor(): temperature(TMP_ANALOG){} + float read(); + private: + AnalogIn temperature; +}; + +#endif \ No newline at end of file