from machine import Pin
from utime import sleep
button=Pin(14,mode=Pin.IN,pull=Pin.PULL_UP)
led=Pin(14,Pin.OUT)
while True:
if button.value()==0:
led.value(1)
sleep(0.5)
elif button.value()==1:
led.value(0)
sleep(0.5)