from machine import Pin
from utime import sleep
button = Pin(14,mode = Pin.IN, pull = Pin.PULL_DOWN)
led = Pin(16,Pin.OUT)
while True:
if button.value():
led.toggle()
sleep(0.5)
from machine import Pin
from utime import sleep
button = Pin(14,mode = Pin.IN, pull = Pin.PULL_DOWN)
led = Pin(16,Pin.OUT)
while True:
if button.value():
led.toggle()
sleep(0.5)