from machine import Pin, ADC
import time
import math
BETA = 3950 # Beta Coefficient of the thermistor
p32 = ADC(Pin(32))
p32.width(ADC.WIDTH_10BIT) # reduce pin reading resolution to match Arduino Uno
while True:
v = p32.read()
print(v)
celsius = 1 / (math.log(1 / (1023 / v - 1)) / BETA + 1.0 / 298.15) - 273.15
print(celsius)
time.sleep(2)