from machine import Pin, ADC
from utime import sleep
import math
temp_sensor = ADC(26)
points_per_volt = 3.3 / 65535
BETA = 3950;
while True:
analogValue = temp_sensor.read_u16();
celsius = 1 / (math.log(1 / (65535. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
print(celsius)
sleep(0.5)