import time
from machine import Pin, Timer
from time import sleep
time.sleep(0.1) # Wait for USB to become ready
print("Hello, Pi Pico!")
BUTTON= Pin(14, mode= Pin.IN, pull = Pin.PULL_UP)
led1 = Pin(16, Pin.OUT)
while True:
if BUTTON.value() == 0:
led1.value(1)
print("Led is ON")
sleep(0.3)
elif BUTTON.value() == 1:
led1.value(0)
'''print("led is off")'''
sleep(0.3)