from machine import Pin
from time import sleep
LED = Pin(15, Pin.OUT)
BUTTON = Pin(16, 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(15, Pin.OUT)
BUTTON = Pin(16, Pin.IN)
while True:
if BUTTON.value() == 1:
LED.on()
sleep(0.1)
else:
LED.off()