18 lines
397 B
C++
18 lines
397 B
C++
#include <FastLED.h>
|
|
|
|
#define NUM_LEDS 512
|
|
#define DATA_PIN 4
|
|
|
|
CRGB leds[NUM_LEDS];
|
|
|
|
void setup() {
|
|
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS); // Use GRB color order
|
|
FastLED.setBrightness(50); // Lower brightness to reduce power draw
|
|
}
|
|
|
|
void loop() {
|
|
fill_solid(leds, NUM_LEDS, CRGB::Red); // Set all LEDs to red
|
|
FastLED.show();
|
|
delay(500); // Pause for half a second
|
|
}
|