from machine import Pin
from time import sleep
button=Pin(2,Pin.IN)
led=Pin(5,Pin.OUT)
while True:
led.value(button.value())
sleep(0.5)
from machine import Pin
from time import sleep
button=Pin(2,Pin.IN)
led=Pin(5,Pin.OUT)
while True:
led.value(button.value())
sleep(0.5)