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