from machine import Pin
from time import sleep
led = Pin(23, Pin.OUT)
button1 = Pin(22, Pin.IN)
button2 = Pin(21, Pin.IN)
while True:
stateButton1 = button1.value()
stateButton2 = button2.value()
print("Estado botão 1:", stateButton1)
print("Estado botão 2:", stateButton2)
if stateButton1 == 1 or stateButton2 == 1:
led.value(1)
else:
led.value(0)