import machine
from machine import Pin
ledRojo = Pin(12, Pin.OUT)
SliderA = Pin(2, Pin.IN, Pin.PULL_UP)
SliderB = Pin(4, Pin.IN, Pin.PULL_UP)
while True:
A = SliderA.value()
B = SliderB.value()
xor = (not A and B) or (A and not B)
ledRojo.value(xor)
print("A="+str(bool(A))+"B="+str(bool(B))+"Xor="+str(bool(xor)))