// 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);

}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
neopixels1:DOUT
neopixels1:VDD
neopixels1:VSS
neopixels1:DIN
neopixels2:DOUT
neopixels2:VDD
neopixels2:VSS
neopixels2:DIN
neopixels3:DOUT
neopixels3:VDD
neopixels3:VSS
neopixels3:DIN