from machine import Pin,ADC
from time import sleep
LDR = ADC(26)
lED = Pin(1,Pin.OUT)
while True:
a=LDR.read_u16()
if a < 61000:
lED.value(1)
else:
lED.value(0)
print(a)
sleep(1)from machine import Pin,ADC
from time import sleep
LDR = ADC(26)
lED = Pin(1,Pin.OUT)
while True:
a=LDR.read_u16()
if a < 61000:
lED.value(1)
else:
lED.value(0)
print(a)
sleep(1)