from machine import Pin,PWM,ADC
from utime import sleep
LDR=ADC(28)
pwm=PWM(Pin(15))
pwm.freq(1000)
while True:
value=LDR.read_u16()
print(value)
pwm.duty_u16(value)
if value<5000:
print("Low")
sleep(0.001)
elif value>5000:
print("better")
sleep(0.001)