import utime
import machine
# variables
boton = machine.Pin(7, machine.Pin.IN, machine.Pin.PULL_UP)
led = machine.Pin(22, machine.Pin.OUT)
while True:
print("Estado:", boton.value())
if(boton.value () == 0):
led.value(1)
else:
led.value (0)