Closed chriscummings closed 11 months ago
Hi Chris!
Even I can't seem to find any useful information about the sensor's temperature pin from the manufacturer or from the internet. Exact reason why I wrote read_temp()
function the way it is.
However, the best way I can recommend to convert it to a meaningful temperature value is to calibrate it on the go. For instance,
int sensorValue = analogRead(sensorPin);
float temperature = map(sensorValue, 0, 1023, minTemperature, maxTemperature);
Just replace the minTemperature
with the lowest temperature possible that you can get from your sensor, same with the maxTemperature
for highest temperature you can get.
Nathanne,
Thank you for your response! 👍
I'll see if I can find the high/low temp info on the thermistor before I try to thermally test it myself.
Closing. Thanks again!
Nathanne,
I'm trying to understand converting the TO pin voltage to a human readable celsius or fahrenheit. I see in your example you are calling ph4502c.read_temp(). However, when I look at that function, it seems like it just returns the straight pin value, not any sort of conversion.
For example, I'll just get a value of 752.00. I can't find any datasheet explaining what the equation should be for temperature.
Thank you.