# 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)