from machine import Pin,ADC
import utime
led1=Pin(3,Pin.OUT)
POT_Value=ADC(28)
conversion_factor=3.3/(65536)
while True:
print(POT_Value.read_u16())
utime.sleep(0.1)
if POT_Value.read_u16()>=30000:
led1.value(1)
print("LED ON")
else:
led1.value(0)
print("LED OFF")
utime.sleep(0.2)