import machine
from machine import Pin
num1 = Pin(12, Pin.OUT);
slider1 = Pin(2, Pin.IN, Pin.PULL_UP);
slider2 = Pin(0, Pin.IN, Pin.PULL_UP);
dato1 = Pin(19, Pin.IN, Pin.PULL_UP);
dato2 = Pin(21, Pin.IN, Pin.PULL_UP);
dato3 = Pin(22, Pin.IN, Pin.PULL_UP);
dato4 = Pin(23, Pin.IN, Pin.PULL_UP);
while True:
S0 = slider1.value();
S1 = slider2.value();
A = dato1.value()
B = dato2.value()
C = dato3.value()
D = dato4.value()
F = ((((A and not S0)or(B and S0)) and not S1)or(((C and not S0)or(D and S0)) and S1));
num1.value(F);
# if S0 == 0 and S1 == 0:
# F = A;
# elif S0 == 1 and S1 == 0:
# F = B;
# elif S0 == 0 and S1 == 1: TAMBIEN FUNCA PERO CON IFS
# F = C;
# else:
# F = D;
# num1.value(F);