import machine
from machine import Pin
LedRojo = Pin(25,Pin.OUT)
Entrada1 = Pin(23,Pin.IN,Pin.PULL_UP)
Entrada2 = Pin(22,Pin.IN,Pin.PULL_UP)
Entrada3 = Pin(21,Pin.IN,Pin.PULL_UP)
Entrada4 = Pin(19,Pin.IN,Pin.PULL_UP)
Entrada5 = Pin(4,Pin.IN,Pin.PULL_UP)
Entrada6 = Pin(15,Pin.IN,Pin.PULL_UP)
while True:
A=Entrada1.value()
B=Entrada2.value()
C=Entrada3.value()
D=Entrada4.value()
s1=Entrada5.value()
s0=Entrada6.value()
valor=((not s0 and not s1) and A) or ((not s1 and s0) and B) or ((s1 and not s0) and C) or ((s1 and s0) and D)
LedRojo.value(valor)