from machine import Pin
import time
button_pin = 25 # GPIO14 for button
led_pin = 33 # GPIO12 for LED
button = Pin(button_pin, Pin.IN, Pin.PULL_UP)
led = Pin(led_pin, Pin.OUT)
while True:
if not button.value(): # button is pressed (active low)
led.value(1) # turn on the LED
else:
led.value(0) # turn off the LED
time.sleep(0.1) # small delay to debounce the button