#Resistor externo em pullup
from machine import Pin
from utime import sleep
botao = Pin(15, Pin.IN)
while True:
if botao.value()==1:
print ('Aguardando o pressionamento do botão')
else:
print ('Aguardando a liberação do botão')
sleep(1)
#Criando rotinas