import time
time.sleep(0.1) # Wait for USB to become ready
from machine import Pin
pulsador=Pin(2,Pin.IN)
led=Pin(1,Pin.OUT)
while True:
if pulsador.value()==1:
led.on()
else:
led.off() import time
time.sleep(0.1) # Wait for USB to become ready
from machine import Pin
pulsador=Pin(2,Pin.IN)
led=Pin(1,Pin.OUT)
while True:
if pulsador.value()==1:
led.on()
else:
led.off()