from machine import Pin
from time import sleep
LED= Pin(1, Pin.OUT)
BUTTON= Pin(12,Pin.IN)
while True:
if BUTTON.value()==1:
LED.on()
sleep(0.1)
else:
LED.off()from machine import Pin
from time import sleep
LED= Pin(1, Pin.OUT)
BUTTON= Pin(12,Pin.IN)
while True:
if BUTTON.value()==1:
LED.on()
sleep(0.1)
else:
LED.off()