from machine import Pin

from time import sleep_ms

led=Pin(25,Pin.OUT)
key=Pin(21,Pin.IN)

while 1:
  print(key.value())
  if key.value()==0:
    led.on()
  else:
    led.off()