from machine import Pin
from time import sleep_ms
botao = Pin(13, Pin.IN, Pin.PULL_DOWN)
antes = botao.value()
while True:
estado = botao.value()
if estado != antes:
if estado == 0:
print ('Estou executando uma ação')
sleep_ms(200)
antes = estado