Hello!
When reading of the thermistor to the analog port of Arduino, an analog value is 4095, so the temperature is equal to 0.
My function is to calculate the temperature:
double getTemperature (int adc)
{
- analogReadResolution (10);*
_ long resistance = (100,000 * (4095 / adc - 1));_ - double result = log (resistance);*
- unsigned int A = 0.000541774592748;*
- unsigned int B = 0.000238870735000;*
- unsigned int C = 0.000000048293022;*
_ result = 1.0 / (A + (B * result) + (C * result * result * result)); _
- result = result - 273.15; // Convert to Celsius*
}
Can anyone suggest a way out of this situation?