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