Temperature library for the full project.

Dependents:   Full-Project

Committer:
ptcrews
Date:
Sat Dec 05 07:31:46 2015 +0000
Revision:
0:a42f4353261f
Child:
1:fc58ae197a88
Temperature library for the full project.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ptcrews 0:a42f4353261f 1 #include "main.h"
ptcrews 0:a42f4353261f 2
ptcrews 0:a42f4353261f 3 #define ADC_CONVERSION 3.3/5.0
ptcrews 0:a42f4353261f 4
ptcrews 0:a42f4353261f 5 #ifndef _TEMP_SENSOR
ptcrews 0:a42f4353261f 6 #define _TEMP_SENSOR
ptcrews 0:a42f4353261f 7
ptcrews 0:a42f4353261f 8 class Temp_Sensor {
ptcrews 0:a42f4353261f 9 public:
ptcrews 0:a42f4353261f 10 Temp_Sensor(): temperature(TMP_ANALOG){}
ptcrews 0:a42f4353261f 11 float read();
ptcrews 0:a42f4353261f 12 private:
ptcrews 0:a42f4353261f 13 AnalogIn temperature;
ptcrews 0:a42f4353261f 14 };
ptcrews 0:a42f4353261f 15
ptcrews 0:a42f4353261f 16 #endif