from machine import Pin
import time

led = Pin(16, Pin.OUT)
button = Pin(14, Pin.IN,Pin.PULL_DOWN)

while True:
    if button.value():
        print("Button is pressed!")
        led.toggle()
        time.sleep(0.5)