import machine
from machine import Pin
ledRojo = Pin(0, Pin.OUT)
boton = Pin(4,Pin.IN)
ledVioleta = Pin(2,Pin.OUT)
boton2 = Pin(9,Pin.IN,Pin.PULL_UP)
while True:
valor = boton.value( )
ledRojo.value(valor)
valor2 = boton2.value( )
ledVioleta(valor2)