from machine import Pin
from time import sleep
led = Pin(0,Pin.OUT)
pulsador=Pin(4,Pin.IN,Pin.PULL_DOWN)
while True:
if pulsador.value()==1:
led.on()
if pulsador.value()==1:
led.toggle()
sleep(0.09)
from machine import Pin
from time import sleep
led = Pin(0,Pin.OUT)
pulsador=Pin(4,Pin.IN,Pin.PULL_DOWN)
while True:
if pulsador.value()==1:
led.on()
if pulsador.value()==1:
led.toggle()
sleep(0.09)