#include <FastLED.h>
#define LED_PIN 25 // Data pin for the LED strip
#define NUM_LEDS 16// Number of LEDs in the strip
CRGB leds[NUM_LEDS];
void setup() {
// Initialize the LED strip
FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
// Set the LEDs to red
setColor(CRGB::Red);
delay(1000);
// Set the LEDs to green
setColor(CRGB::Green);
delay(1000);
// Set the LEDs to blue
setColor(CRGB::Blue);
delay(1000);
}
// Function to set the LED color
void setColor(CRGB color) {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = color;
}
FastLED.show();
}