from machine import Pin
from time import sleep
led = Pin(1, Pin.OUT)
button = Pin(28, Pin.IN, Pin.PULL_DOWN)
while True:
led.value(button.value())
from machine import Pin
from time import sleep
led = Pin(1, Pin.OUT)
button = Pin(28, Pin.IN, Pin.PULL_DOWN)
while True:
led.value(button.value())