#include <Adafruit_NeoPixel.h>
#define LED_PIN 2 // GPIO2 on Raspberry Pi Pico
#define NUM_LEDS 16 // Change to your ring’s LED count
Adafruit_NeoPixel ring(NUM_LEDS, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial1.begin(115200);
Serial1.println("Hello, Raspberry Pi Pico!");
ring.begin(); // Initialize NeoPixel ring
ring.show(); // Turn off all pixels
}
void loop() {
// Turn ON all LEDs (red in this case)
for (int i = 0; i < NUM_LEDS; i++) {
ring.setPixelColor(i, ring.Color(255, 0, 0)); // Red color
}
ring.show();
delay(2000); // Wait 2 seconds
// Turn OFF all LEDs
for (int i = 0; i < NUM_LEDS; i++) {
ring.setPixelColor(i, 0); // Off
}
ring.show();
delay(2000); // Wait 2 seconds
}