from machine import ADC, Pin, PWM
import time
cds = ADC(Pin(26))
led = PWM(Pin(15))
led.freq(1000)
while True:
light = cds.read_u16()
led.duty_u16(light)
time.sleep(0.05)from machine import ADC, Pin, PWM
import time
cds = ADC(Pin(26))
led = PWM(Pin(15))
led.freq(1000)
while True:
light = cds.read_u16()
led.duty_u16(light)
time.sleep(0.05)