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)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT