from machine import Pin
led = Pin(2, Pin.OUT)
boton = Pin(4, Pin.IN)
while True:
if boton.value() == 1:
led.on()
else:
led.off()from machine import Pin
led = Pin(2, Pin.OUT)
boton = Pin(4, Pin.IN)
while True:
if boton.value() == 1:
led.on()
else:
led.off()