from machine import Pin
import time
led = Pin(5, Pin.OUT)
boton = Pin(9, Pin.IN, Pin.PULL_UP)
estado_led = 0
boton1 = Pin(13, Pin.IN, Pin.PULL_UP)
estado_led = 0
while True:
if boton.value() ==0:
estado_led = not estado_led
led.value(estado_led)
time.sleep(0.3) #evitar rebotes
if boton1.value() ==0:
estado_led = not estado_led
led.value(estado_led)
time.sleep(0.3) #evitar rebotes