Calculate temperature based on resistance from thermistor with lookup chart

thermister_ert-j0eg1.h

Committer:
joeata2wh
Date:
2016-03-30
Revision:
5:88bf5a42812e
Parent:
0:39f659087759
Child:
6:3c9cb2bd08c6

File content as of revision 5:88bf5a42812e:

#ifndef thermister_ert_j0eg1_h
#define thermister_ert_j0eg1_h
#define ERTThermisterAdcRef  3.30f
#define ERTThermisterErrorOver 255.0f 
#define ERTThermisterErrorUnder -255.0f

float conv_c_to_f(float tempC);
float conv_f_to_c(float tempF);
float ERTThermisterReadTemp(AnalogIn adcpin);
float ERTThermisterAvgReadTemp(AnalogIn adcpin, int numRead);


// Read the ERT0xxx thermister and return the temperature
// in C on the specified pin. 
// TODO:  How do we detect and report error of -999;

// Shorthand to read thermister by pinName
// rather than reading it with pre-allocated
// AnalogIn.  
float ERTThermisterRead(PinName apin);

// read the temp from thermister and print out
// both the reading and intermediate values.
float ERTThermisterReadPrint(Serial log, char *label, PinName apin);

#endif