import machine

led = machine.Pin(9, machine.Pin.OUT)
button = machine.Pin(16, machine.Pin.OUT)

while True:
    if button.value() == 1:
        led.value(1)
    if button.value() == 0:
        led.value(0)
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT