from machine import Pin
from time import sleep
led = Pin(4,Pin.OUT)
botao_dir = Pin(23, Pin.IN, Pin.PULL_UP)
botao_esq = Pin(32, Pin.IN, Pin.PULL_DOWN)
flag_e = 0
flag_d = 0
while True:
sleep(0.5)
if botao_esq.value() == 1:
led.on()
if botao_dir.value() == 0:
led.off()