from machine import Pin
from time import sleep
# Declare GPIO pins for LED and button
led = Pin(2, Pin.OUT)
button = Pin(5, Pin.IN, Pin.PULL_DOWN)
# Main loop to check the state of the button press
while True:
led.value(button.value())
sleep(0.1)