""" Circuito votador Ecuacion Logica: Y = AB+AC+BC """
from machine import Pin
P1 = Pin(13,Pin.IN,Pin.PULL_DOWN) # Pulsador 1
P2 = Pin(14,Pin.IN,Pin.PULL_DOWN) # Pulsador 2
P3 = Pin(15,Pin.IN,Pin.PULL_DOWN) # Pulsador 3
votador = Pin(16,Pin.OUT) # Salida
while True:
A = P1.value() # Entrada A
B = P2.value() # Entrada B
C = P3.value() # Entrada C
if((A and B) or (A and C) or (B and C)):
votador.on()
else: votador.off()