I deleted this line and added my blinking animation. But now everything is blinking fast and I don't have the meteor animation anymore
#include "FastLED.h"
#define NUM_LEDS 88
CRGB leds[NUM_LEDS];
#define PIN 6
// Deklaration der Funktion slowBlink vor dem Setup
void slowBlink(CRGB color, int interval);
void setup()
{
FastLED.addLeds<WS2811, PIN, GRB>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
}
void loop() {
meteorRain(CRGB(0xCE, 0x08, 0xFF), 10, 30, false, 25);
slowBlink(CRGB(0xCE, 0x08, 0xFF), 500); // Lila Blinken für die erste und letzte LED (500 ms Intervall)
}
void meteorRain(CRGB color, byte meteorSize, byte meteorTrailDecay, boolean meteorRandomDecay, int SpeedDelay) {
fill_solid(leds, NUM_LEDS, CRGB::Black);
for(int i = 0; i < NUM_LEDS+NUM_LEDS; i++) {
// fade brightness all LEDs one step
for(int j = 0; j < NUM_LEDS; j++) {
if ((!meteorRandomDecay) || (random(10) > 5)) {
leds[j].fadeToBlackBy(meteorTrailDecay);
}
}
// draw meteor
for(int j = 0; j < meteorSize; j++) {
if ((i - j < NUM_LEDS) && (i - j >= 0)) {
leds[i - j] = color;
}
}
FastLED.show();
}
}
// Definition der slowBlink Funktion
void slowBlink(CRGB color, int interval) {
static unsigned long lastUpdateTime = 0;
static boolean state = false;
if (millis() - lastUpdateTime >= interval) {
lastUpdateTime = millis();
state = !state;
if (state) {
// Lila für die erste LED
leds[0] = color;
// Lila für die letzte LED
leds[NUM_LEDS - 1] = color;
} else {
// LEDs ausschalten
fill_solid(leds, NUM_LEDS, CRGB::Black);
}
FastLED.show();
}
}