#include "FastLED.h" // add fastled library

#define NUM_LEDS 118  // total leds  
#define DATA_PIN 8    // led data pin
CRGB leds[NUM_LEDS];

void setup() { 
      // Uncomment/edit one of the following lines for your leds arrangement.
      // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS);
       FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); // led in use - ws2811 with color sequence RGB
      // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS);
      
      // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS);

      // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
      // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);

     
}

void loop() { 
  /*******************************************/
  // open first effect file - rainbow.dat
  // file size 70,800 bytes
      //or
  // total leds 118
  // 3 bytes for each rgb color
  // total recorded frames 200
  // 118 x 3 X 200 = 70,800 bytes
  /*******************************************/
  
   file.open("rainbow.dat", O_READ); 

   for(int i = 0 ;i<200;i++) // 200 frames
  {
    
   file.read((uint8_t*)leds,NUM_LEDS*3); // total bytes(buffer) for each frame 118 x 3 = 354
                         

  FastLED.show();
  delay(40); // delay between each frame 
  }

  file.close();

   /*******************************************/
  // open second effect file - up.dat
  // file size 125,670 bytes
      //or
  // total leds 118
  // 3 bytes for each rgb color
  // total recorded frames 355
  // 118 x 3 X 355 = 125,670 bytes
  /*******************************************/
  
   file.open("up.dat", O_READ);

   for(int i = 0 ;i<355;i++) // 355 frames
  {
   file.read((uint8_t*)leds,NUM_LEDS*3);  // total bytes(buffer) for each frame 118 x 3 = 354

  FastLED.show();
  delay(20); // delay between each frame 
  }

  file.close();

   /*******************************************/
  // open third effect file - passage.dat
  // file size 123,546 bytes
      //or
  // total leds 118
  // 3 bytes for each rgb color
  // total recorded frames 349
  // 118 x 3 X 349 = 123,546 bytes
  /*******************************************/
   file.open("passage.dat", O_READ);

   for(int i = 0 ;i<349;i++) // 349 frames
  {
   file.read((uint8_t*)leds,NUM_LEDS*3);  // total bytes(buffer) for each frame 118 x 3 = 354

  FastLED.show();
  delay(30); // delay between each frame 
  }

  file.close();

}