Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
thermister_ert-j0eg1.h
00001 /* thermister_ert-j0eg1.h 00002 Read the ERT0xxx thermister and return the temperature 00003 in C on the specified pin. Includes lookup table to 00004 compute precision temperature based on non-linear 00005 change of resistance in thermister. 00006 00007 Update the resitance array in cpp to properly reflect 00008 your specific device. 00009 00010 By Joseph Ellsworth CTO of A2WH 00011 Take a look at A2WH.com Producing Water from Air using Solar Energy 00012 March-2016 License: https://developer.mbed.org/handbook/MIT-Licence 00013 */ 00014 #ifndef thermister_ert_j0eg1_h 00015 #define thermister_ert_j0eg1_h 00016 #define ERTThermisterAdcRef 3.30f 00017 #define ERTThermisterErrorOver 255.0f 00018 #define ERTThermisterErrorUnder -255.0f 00019 00020 float conv_c_to_f(float tempC); 00021 float conv_f_to_c(float tempF); 00022 float ERTThermisterReadTemp(AnalogIn adcpin); 00023 float ERTThermisterAvgReadTemp(AnalogIn adcpin, int numRead); 00024 00025 00026 00027 // Shorthand to read thermister by pinName 00028 // rather than reading it with pre-allocated 00029 // AnalogIn. 00030 float ERTThermisterRead(PinName apin); 00031 00032 // read the temp from thermister and print out 00033 // both the reading and intermediate values. 00034 float ERTThermisterReadPrint(Serial log, char *label, PinName apin); 00035 00036 #endif
Generated on Sat Jul 16 2022 23:26:08 by
1.7.2