# Toggles the onboard LED on Raspberry Pi Pico / RP2040 (GP25).

from machine import Pin
from time import sleep

# Initialize the onboard LED pin as digital output
led = Pin(25, Pin.OUT)

# Infinite loop toggling the LED state every 0.5 seconds (1 Hz blink rate)
while True:
    led.toggle()  # Invert current pin output state
    sleep(0.5)    # Delay for 500 ms