I've installed picozero into Thonny for a Pico W.
The temperature sensor value is accessed asThe value returned for temperature is around 33 at room temperature (23 C).
The picozero libarary includes a conversion routine:
It is instantiated in the picozero library as
I'm trying to understand why the temperature sensor is returning this value that seems high. Is the sensor an "on-chip" temperature that is normally about 10 degrees higher than ambient?
The temperature sensor value is accessed as
Code:
temperature = pico_temp_sensor.temp
The picozero libarary includes a conversion routine:
Code:
def pico_temp_conversion(voltage): # Formula for calculating temp from voltage for the onboard temperature sensor return 27 - (voltage - 0.706)/0.001721
Code:
pico_temp_sensor = TemperatureSensor(4, True, 0.5, pico_temp_conversion)
Statistics: Posted by timg11 — Wed Dec 27, 2023 4:42 pm