import machine
import time

buttonpin = machine.Pin(0, machine.Pin.IN)
ledextern = machine.Pin(14, machine.Pin.OUT)

while True:
  print(buttonpin.value())
  ledextern.value(not buttonpin.value())
  time.sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT