th
Dependents: condato_Coldchainlogger condato_Coldchainlogger
Diff: Thermistor.cpp
- Revision:
- 2:374faf195af3
- Parent:
- 0:000a8be2414d
--- a/Thermistor.cpp Wed Mar 09 13:56:37 2016 +0000 +++ b/Thermistor.cpp Thu Jul 09 15:56:36 2020 +0000 @@ -27,7 +27,7 @@ SeriesResistor = SERIESRESISTOR; } - // This is the workhorse routine that calculates the temperature + // This is the workhorse routine that calculates the temperature // using the Steinhart-Hart equation for thermistors // https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation float Thermistor::get_temperature() @@ -41,11 +41,11 @@ a += _pin.read_u16(); // Read 16bit Analog value } a = a/smooth; // Get average of samples - // pc.printf("Raw Analog Value for Thermistor = %d\r\n",a); + //printf("Raw Analog Value for Thermistor = %d\r\n",a); /* Calculate the resistance of the thermistor from analog votage read. */ resistance = (float) SeriesResistor / ((65536.0 / a) - 1); - // pc.printf("Resistance for Thermistor = %f\r\n",resistance); + //printf("Resistance for Thermistor = %f\r\n",resistance); steinhart = resistance / ThermistorNominal; // (R/Ro) steinhart = log(steinhart); // ln(R/Ro)