#include <FastLED.h>
#define STRIP_1_PIN 7
#define STRIP_2_PIN 6
#define NUM_LEDS 30
#define BRIGHTNESS 255
// --- Folyékony paraméterek (Ugrásmentes, extra hosszú) ---
float spread = 18.0; // Fix, extrém hosszú csóva (30 LED-en ez a csúcs)
float speed = 1.4; // Lassú, méltóságteljes hömpölygés
// ---------------------------------------------------------
CRGB leds1[NUM_LEDS];
CRGB leds2[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, STRIP_1_PIN, GRB>(leds1, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.addLeds<WS2812B, STRIP_2_PIN, GRB>(leds2, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(BRIGHTNESS);
}
void loop() {
// Nagyon finom időszeletelés
float t = millis() * 0.001 * speed;
// Szinuszos pozíció: 0.5 és NUM_LEDS-1.5 között (hogy ne vágja le a szélén a "magot")
float center = ((NUM_LEDS - 1) * 0.5) * (sin(t) + 1.0);
FastLED.clear();
for (int i = 0; i < NUM_LEDS; i++) {
float dist = i - center;
// Szimmetrikus Gauss-függvény: mindkét irányba egyformán hosszú csóva
// Nincs mozgásirány-függő váltás, így nincs ugrás sem!
float intensity = exp(-(dist * dist) / (2.0 * spread));
if (intensity > 0.001) {
uint8_t redVal = intensity * 255;
// Tiszta piros szín a [FastLED CRGB](https://fastled.io) segítségével
CRGB pureRed = CRGB(redVal, 0, 0);
leds1[i] = pureRed;
leds2[i] = pureRed;
}
}
// Megjelenítés a [FastLED.show()](https://fastled.io) hívással
FastLED.show();
delay(4);
}