import machine
import utime
led = machine.Pin(25, machine.Pin.OUT)
boton = machine.Pin(15, machine.Pin.IN, machine.Pin.PULL_DOWN)
while True:
if boton():
led.value(1)
utime.sleep_ms(200)
else:
led.value(0)import machine
import utime
led = machine.Pin(25, machine.Pin.OUT)
boton = machine.Pin(15, machine.Pin.IN, machine.Pin.PULL_DOWN)
while True:
if boton():
led.value(1)
utime.sleep_ms(200)
else:
led.value(0)