// https://www.reddit.com/r/FastLED/comments/1hf1h1r/revere_strip_with_fastled/
#include "FastLED.h"
#define NUM_STRIPS 3
#define NUM_LEDS_PER_STRIP_50 50
#define NUM_LEDS_PER_STRIP_100 100
#define NUM_LEDS NUM_LEDS_PER_STRIP_50 + NUM_LEDS_PER_STRIP_100 + NUM_LEDS_PER_STRIP_50
CRGB leds[NUM_LEDS];
uint8_t patternCounter = 0;
bool isRunning = false;
#define SPARKLE_AMOUNT 30
#define SPARKLEBOMB_AMOUNT 10
#define FADEOUT_SPEED 40
#define GLITTER_AMOUNT 60
uint8_t gHue = 0;
uint8_t GLOBAL_BRIGHTNESS = 125;
uint8_t fps = 60;
uint8_t index = 0; //-LED INDEX (0 to LED_COUNT-1)
#include "MyFunctions.h"
MyFunctions func;
void setup() {
// tell FastLED there's 100 WS2811 leds on pin 3, starting at index 0 in the led array
FastLED.addLeds<WS2811, 3>(leds, 0,NUM_LEDS_PER_STRIP_50);
// tell FastLED there's 100 WS2811 leds on pin 4, starting at index 60 in the led array
FastLED.addLeds<WS2811, 4>(leds, NUM_LEDS_PER_STRIP_50, NUM_LEDS_PER_STRIP_100);
// tell FastLED there's 60 NEOPIXEL leds on pin 5, starting at index 120 in the led array
FastLED.addLeds<WS2811, 5>(leds, NUM_LEDS_PER_STRIP_50 + NUM_LEDS_PER_STRIP_100, NUM_LEDS_PER_STRIP_50);
}
void loop() {
fadeToBlackBy(leds, NUM_LEDS,5);
uint8_t beat1 = beatsin16(5, 0 , NUM_LEDS-1);
uint8_t beat2 = beatsin16(5, 0 , NUM_LEDS-1,0,65535/2);
leds[beat1] = CRGB::White;
leds[beat2] = CRGB::White;
func.invertLedPosition(0, 49);
// func.invertLedPosition(50, 149);
FastLED.show();
func.invertLedPosition(0, 49);
// func.invertLedPosition(50, 149);
}