Temperature library for the full project.
Temp_Sensor.h
- Committer:
- ptcrews
- Date:
- 2015-12-07
- Revision:
- 1:fc58ae197a88
- Parent:
- 0:a42f4353261f
File content as of revision 1:fc58ae197a88:
#include "main.h" #define ADC_CONVERSION 3.3/5.0 // ADC conversion ratio to get proper reading #ifndef _TEMP_SENSOR #define _TEMP_SENSOR /* Class: Temp_Sensor * ------------------ * Defines the entire temp sensor interface for the AD22100K * temperature sensor. Note: Only valid when connected to 5V. */ class Temp_Sensor { public: Temp_Sensor(): temperature(TMP_ANALOG){} float read(); private: AnalogIn temperature; }; #endif