import machine
from machine import Pin
ledRojo = Pin(1, Pin.OUT)
SliderA = Pin(5,Pin.IN,Pin.PULL_UP)
SliderB = Pin(4,Pin.IN,Pin.PULL_UP)
SliderC = Pin(6,Pin.IN, Pin.PULL_UP)
while True:
A = SliderA.value()
B = SliderB.value()
C = SliderC.value()
mayoria = ((A and B) or (A and C) or (B and C))
ledRojo.value(mayoria)
Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1