import machine
import utime
led_externo = machine.Pin(14, machine.Pin.OUT)
boton = machine.Pin(15, machine.Pin.IN, machine.Pin.PULL_UP)
while True:
if boton.value() == 0:
led_externo.value(1)
utime.sleep(.1)
if boton.value() == 1:
led_externo.value(0)
utime.sleep(.1)
led_externo.value(0)