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