print("Hello, Pi Pico!")
print("This is Experiment - 8 and Objective - 4")
print("Name:Ashwini Kumar Behera; Registration No.: 1941012390")
print('''Objective : 4 Implementation of Room Temperature Meter with a
Liquid Crystal Display (LCD) using Raspberry Pi.''')
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="Celsius: %.2f C" % (Cel)
lcd.message(string)
utime.sleep(2)
lcd.clear()