# control Pico Onboard LED
# import modules

from machine import Pin
from time import sleep

# configure the LED pin and switch
led = Pin(15, Pin.OUT)
button  = Pin(14, Pin.IN, Pin.PULL_DOWN)

while True:

     if button.value()== 1:
         led.value(1) #trun on the lED
         sleep(0.2)
         led.value(0) # Turn off LED
         sleep(0.2)
 


BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT