from machine import Pin
ldr_in=Pin(26,Pin.IN)
led=Pin(8,Pin.OUT)
while True:
temp=ldr_in.value()
if temp:
led.on()
else:
led.off()
from machine import Pin
ldr_in=Pin(26,Pin.IN)
led=Pin(8,Pin.OUT)
while True:
temp=ldr_in.value()
if temp:
led.on()
else:
led.off()