mn
Revision 2:ee3997416bcc, committed 2019-08-12
- Comitter:
- attila0970
- Date:
- Mon Aug 12 11:10:04 2019 +0000
- Parent:
- 1:601e1435dfb8
- Commit message:
- asd;
Changed in this revision
Thermistor.cpp | Show annotated file Show diff for this revision Revisions of this file |
Thermistor.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 601e1435dfb8 -r ee3997416bcc Thermistor.cpp --- a/Thermistor.cpp Wed Mar 09 13:56:37 2016 +0000 +++ b/Thermistor.cpp Mon Aug 12 11:10:04 2019 +0000 @@ -32,8 +32,8 @@ // https://en.wikipedia.org/wiki/Steinhart%E2%80%93Hart_equation float Thermistor::get_temperature() { - float temperature =0, resistance =0; - float steinhart =0; + double temperature =0, resistance =0; + double steinhart =0; double a=0; int smooth = 5; // Number of samples to smooth
diff -r 601e1435dfb8 -r ee3997416bcc Thermistor.h --- a/Thermistor.h Wed Mar 09 13:56:37 2016 +0000 +++ b/Thermistor.h Mon Aug 12 11:10:04 2019 +0000 @@ -78,7 +78,7 @@ #include "mbed.h" -#define THERMISTORNOMINAL 100000 // 100k default +#define THERMISTORNOMINAL 10000 // 100k default // temp. for nominal resistance (almost always 25 C) #define TEMPERATURENOMINAL 25 // The beta coefficient of the thermistor (usually 3000-4000) @@ -108,10 +108,10 @@ private: AnalogIn _pin; - float ThermistorNominal; - float TemperatureNominal; - float BCoefficient; - float SeriesResistor; + double ThermistorNominal; + double TemperatureNominal; + double BCoefficient; + double SeriesResistor; }; #endif