#include <Adafruit_NeoPixel.h>
#define PIN 6 // Pin connected to the data input of the LED ring
#define NUM_LEDS 16 // Number of LEDs in the ring
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin(); // Initialize the LED strip
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
for (int i = 0; i < NUM_LEDS; i++) {
strip.clear(); // Turn off all LEDs
strip.setPixelColor(i, strip.Color(255, 0, 0)); // Set the current LED to red
strip.show(); // Update the LED ring to display the current state
delay(100); // Wait for 1 second before moving to the next LED
}
}