import machine
from machine import Pin
S1=Pin(1, Pin.OUT)
S0=Pin(3, Pin.OUT)
E1=Pin(4, Pin.IN, Pin.PULL_UP)
E2=Pin(5, Pin.IN, Pin.PULL_UP)
E3=Pin(6, Pin.IN, Pin.PULL_UP)
while True:
A=E1.value()
B=E2.value()
C=E3.value()
suma1=((A and B) or (B and C) or (A and C))
suma0=((A and B and C) or (not A and B and not C) or (A and not B and not C) or (not A and not B and C))
S1.value(suma1)
S0.value(suma0)Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1