I 've built
this example and works fine.
Now I want to have multiple sensors (I use
NTC thermistors as sensors) and so I 've built
this, but I must modify the software.
The difference between these 2 circuits is:
In the first example, the thermistor is the bottom resistor of the voltage divider.
In the second example, the thermistor is the top resistor of the voltage divider.
The part of the code that I have to modify is:
float logR = log( 10000 * ( 1024 / readValue - 1 )); // Separate the calculation for simplicity and debugging
celsiusTemperature = 1 / ( aConst + bConst * logR + cConst * pow(logR,3) ) - 273.15; // Calculate the temperature in Celsius
fahrenheitTemperature = celsiusTemperature * 9 / 5 + 32;
Any help is welcome.