import machine
from machine import Pin
#Salidas
ledRojo = Pin(1, Pin.OUT)
ledAzul = Pin(2,Pin.OUT)
#Entradas
SliderA = Pin(4, Pin.IN,Pin.PULL_UP)
SliderB = Pin(5, Pin.IN,Pin.PULL_UP)
SliderC = Pin(6, Pin.IN,Pin.PULL_UP)
#Codificador Simple 3 entradas y 2 salidas
while True:
A = SliderA.value()
B = SliderB.value()
C = SliderC.value()
s1 = (B or C)
ledAzul.value(s1)
s2 = (A or C)
ledRojo.value(s2)