#include <FastLED.h>
#define LED_PIN 1
#define NUM_LEDS 64
#define BRIGHTNESS 64
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
int randomPixel = random(NUM_LEDS); // Select a random LED
CRGB randomColor = CHSV(random(256), 255, 255); // Random color (Hue-Saturation-Value)
// Turn the selected pixel on with a random color
leds[randomPixel] = randomColor;
FastLED.show(); // Update the LED strip
//delay(100); // Wait for a short period
// Turn the selected pixel off
leds[randomPixel] = CRGB::Black;
FastLED.show(); // Update the LED strip
//delay(100); // Wait for a short period before the next blink
}