from machine import Pin
import time
led1_pin = Pin(0,Pin.OUT)
button1_pin = Pin(2,Pin.IN,Pin.PULL_UP)

while 1:
  led1_pin.value(button1_pin.value())
  print(button_pin.value())

  time.sleep(1)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT