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)