#include <FastLED.h>
#define NUM_LEDS 2
#define DATA_PIN 12
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); // GRB ordering is assumed
Serial.begin(115200);
}
void loop() {
for (int i = 0; i < NUM_LEDS; i = i + 1) {
leds[i] = CRGB::Green;
}
FastLED.show();
delay(1000);
for (int i = 0; i < NUM_LEDS; i = i + 1) {
leds[i] = CRGB::White;
}
FastLED.show();
Serial.println("===");
}