#include <FastLED.h>

#define LED_PIN     2
#define NUM_LEDS    8

CRGB leds[NUM_LEDS];

void setup() {

  FastLED.addLeds<WS2812, LED_PIN, GRB>(leds, NUM_LEDS);
  
}

int rLed = 0;
int d = 30;
int r = 0;
int g = 0;
int b = 0;



void loop() {
  // put your main code here, to run repeatedly:
  for(int i=0; i<255; i+=5){
  fill_solid( leds, NUM_LEDS, CRGB(i,0,0));
  //leds[0] = CRGB(i,0,0);
  FastLED.show();
  delay(d);  
  }

  
  
 
  for(int i = 255; i>=0; i-=5){
  	 fill_solid( leds, NUM_LEDS, CRGB(i,0,0));
    //leds[0] = CRGB(i,0,0);
    FastLED.show();
    delay(d);
  }
for(int n=0; n<NUM_LEDS; n++){
  for(int i=0; i<6; i++){
    leds[n] = CRGB(255,255,255);
    FastLED.show();
    delay(d);
    leds[n] = CRGB(0,0,0);
    FastLED.show();
    delay(d);
  }
  delay(d*15);
}


for(int n=0; n<NUM_LEDS*15; n++){
rLed = random(NUM_LEDS);


r = random(0,255);
g = random(0,255);
b = random(0,255);
leds[rLed] = CRGB(r,g,b);
  FastLED.show();
  delay(d*3);
}







for (int r1=0; r1<11; r1++){



r = random(0,255);
g = random(0,255);
b = random(0,255);
for(int n = 0; n<NUM_LEDS; n++){
  leds[n] = CRGB(r,g,b);
  FastLED.show();
  delay(d*3);
}
for(int n = 0; n<NUM_LEDS; n++){
  leds[n] = CRGB(0,0,0);
  FastLED.show();
  delay(d*3);
}

for(int n = NUM_LEDS ; n>=0; n--){
  leds[n] = CRGB(r,g,b);
  FastLED.show();
  delay(d*3);
}

for(int  n = NUM_LEDS; n>=0; n--){
  leds[n] = CRGB(0,0,0);
  FastLED.show();
  delay(d*3);
}

}

}