import machine
from machine import Pin
#ENTRADA
S1_in = Pin(19, Pin.IN, Pin.PULL_UP)
S2_in = Pin(18, Pin.IN, Pin.PULL_UP)
#SALIDA
led_A = Pin(14, Pin.OUT)
led_B = Pin(27, Pin.OUT)
led_C = Pin(26, Pin.OUT)
led_D = Pin(25, Pin.OUT)
while True:
S1 = S1_in.value()
S2 = S2_in.value()
A = (not S1 and not S2)
B = (not S1 and S2)
C = (S1 and not S2)
D = (S1 and S2)
led_A.value(A)
led_B.value(B)
led_C.value(C)
led_D.value(D)