import machine
from machine import Pin
#definimos salidas
LedRojoA = Pin(26,Pin.OUT)
LedVerdeB = Pin(27,Pin.OUT)
LedAzulC = Pin(14,Pin.OUT)
LedAmarilloD = Pin(12,Pin.OUT)
#definimos entradas
SliderS1 = Pin(4,Pin.IN,Pin.PULL_UP)
SliderS0 = Pin(2,Pin.IN,Pin.PULL_UP)
while True:
S1 = SliderS1.value()
S0 = SliderS0.value()
A = ((not S1 and not S0))
B = ((not S1 and S0))
C = ((S1 and not S0))
D = ((S1 and S0))
LedRojoA.value(A)
LedVerdeB.value(B)
LedAzulC.value(C)
LedAmarilloD.value(D)