import machine
import utime

led = machine.Pin(3, machine.Pin.OUT)
ldr = machine.ADC(1)

while True:
    ldr_value = ldr.read_u16()
    print(str(ldr_value) + " lux")
    if ldr_value < 30000:
        led.value(1)
    else:
        led.value(0)
    utime.sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT