from gpio_lcd import GpioLcd
from machine import Pin
import time
temp=machine.ADC(27)
lcd=GpioLcd(rs_pin=Pin(8),
enable_pin=Pin(9),
d4_pin=Pin(10),
d5_pin=Pin(11),
d6_pin=Pin(12),
d7_pin=Pin(13))
conversion_factor=(3.3/(65536))
while True:
val = (temp.read_u16())
heat = (val*conversion_factor)*100
heat1 = int(heat)
print(heat1)
lcd.move_to(0,0)
lcd.putstr("temperature:")
lcd.move_to(0,1)
lcd.putstr(str(heat1))
lcd.move_to(4,1)
lcd.putstr("°c")
time.sleep(1)