// Define the LED pin as D9 (GPIO 9 on XIAO RP2040) #define USER_LED_PIN 9 void setup() { // This runs once when the board powers on or resets // pinMode() sets the pin mode to OUTPUT pinMode(USER_LED_PIN, OUTPUT); // Initialize serial communication for debugging (optional) Serial.begin(115200); Serial.println("LED Blink Program Started!"); } void loop() { // This runs continuously forever // Turn the LED ON (set pin to HIGH = 3.3V) digitalWrite(USER_LED_PIN, HIGH); delay(1000); // Wait 1000 milliseconds (1 second) // Turn the LED OFF (set pin to LOW = 0V) digitalWrite(USER_LED_PIN, LOW); delay(1000); // Wait 1000 milliseconds (1 second) // The LED now blinks on and off with 1-second intervals }