from machine import Pin
import utime
button=Pin(12,Pin.IN,Pin.PULL_DOWN)
led=Pin(0,Pin.OUT)
while True:
if button.value():
led.value(0)
utime.sleep(0.5)
else:
led.value(1)
utime.sleep(0.5)
from machine import Pin
import utime
button=Pin(12,Pin.IN,Pin.PULL_DOWN)
led=Pin(0,Pin.OUT)
while True:
if button.value():
led.value(0)
utime.sleep(0.5)
else:
led.value(1)
utime.sleep(0.5)