from lcd1602 import LCD
import machine
import utime
import math
thermistor=machine.ADC(28)
lcd=LCD()
while True:
temperature_value=thermistor.read_u16()
Vr=3.3*float(temperature_value)/65535
Rt=10000*Vr/(3.3-Vr)
temp=1/(((math.log(Rt/10000))/3950)+(1/(273.15+25)))
Cel=temp-273.15
string="Temp :%.2f C" % (Cel)
lcd.message(string)
utime.sleep(2)
lcd.clear()