#define FASTLED_ALLOW_INTERRUPTS 0
#include <FastLED.h>
FASTLED_USING_NAMESPACE
#define DATA_PIN 5
#define NUM_LEDS 117
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
//////////////////////////////////////////////////////////////////////////
CRGB leds1[NUM_LEDS];//this array represents the sequence of available leds (in this example 100)
void setup()
{
delay(1000); // 1 second delay for boot recovery
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds1, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setMaxPowerInVoltsAndMilliamps( 3.3, 500);
}
void loop()
{
int msec = millis()%4000; //time of pulse run (in seconds), change by 1000 increments
double msecPos = msec/3000.0 * NUM_LEDS;
for(int i = 0; i < NUM_LEDS; i++){
double a = -0.5*(i-msecPos)*(i-msecPos); // adjust the number 0.5 to change the width - smaller number = wider pulse
double y = 200*pow(2, a);
leds1[i] = CHSV(150, 255, (int)y);
}
FastLED.show();
}