Temperature library for the full project.

Dependents:   Full-Project

Committer:
ptcrews
Date:
Mon Dec 07 00:06:03 2015 +0000
Revision:
1:fc58ae197a88
Parent:
0:a42f4353261f
Added comments.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ptcrews 0:a42f4353261f 1 #include "main.h"
ptcrews 0:a42f4353261f 2
ptcrews 1:fc58ae197a88 3 #define ADC_CONVERSION 3.3/5.0 // ADC conversion ratio to get proper reading
ptcrews 0:a42f4353261f 4
ptcrews 0:a42f4353261f 5 #ifndef _TEMP_SENSOR
ptcrews 0:a42f4353261f 6 #define _TEMP_SENSOR
ptcrews 0:a42f4353261f 7
ptcrews 1:fc58ae197a88 8 /* Class: Temp_Sensor
ptcrews 1:fc58ae197a88 9 * ------------------
ptcrews 1:fc58ae197a88 10 * Defines the entire temp sensor interface for the AD22100K
ptcrews 1:fc58ae197a88 11 * temperature sensor. Note: Only valid when connected to 5V.
ptcrews 1:fc58ae197a88 12 */
ptcrews 0:a42f4353261f 13 class Temp_Sensor {
ptcrews 0:a42f4353261f 14 public:
ptcrews 0:a42f4353261f 15 Temp_Sensor(): temperature(TMP_ANALOG){}
ptcrews 0:a42f4353261f 16 float read();
ptcrews 0:a42f4353261f 17 private:
ptcrews 0:a42f4353261f 18 AnalogIn temperature;
ptcrews 0:a42f4353261f 19 };
ptcrews 0:a42f4353261f 20
ptcrews 0:a42f4353261f 21 #endif