import machine
from machine import Pin
ledRojo = Pin(1,Pin.OUT)
boton = Pin(5,Pin.IN,Pin.PULL_UP)
while True:
valor = boton.value()
ledRojo.value(valor)import machine
from machine import Pin
ledRojo = Pin(1,Pin.OUT)
boton = Pin(5,Pin.IN,Pin.PULL_UP)
while True:
valor = boton.value()
ledRojo.value(valor)