   set_led_rgb(2, 1, 0, 0, 255);    
 }
 
+int lastNumLedsToLight = 0;
+
 void ShowPotValue()
 {
   int val = analogRead(PIN_BRIGHTNESS);
   int numLedsToLight = map(val, 0, 1023, 0, 200);
+
+  if(numLedsToLight != lastNumLedsToLight)
+  {
+    lastNumLedsToLight = numLedsToLight;
+    Serial.print("Pot: ");    
+    Serial.println(lastNumLedsToLight);
+  }  
 
   FastLED.clear();
     for(int led = 0; led < numLedsToLight; led++) { 
       leds[led] = CRGB::Blue; 
     }
   FastLED.show();
+}
+
+bool shown = false;
+
+int ShowFiles()
+{
+  unsigned long currentMillis = millis();
+  long delta = currentMillis - previousMillis;
+  if(delta < interval)
+    return;  
+  previousMillis = currentMillis;
+  currentFileIndex++;    
+
+  FastLED.clear();
+
+  sprintf(curFileName, "%02d.txt", currentFileIndex);
+  myFile = SD.open(curFileName, FILE_READ);
+  if(!myFile)
+  {
+    currentFileIndex = 1;
+    sprintf(curFileName, "%02d.txt", currentFileIndex);
+    myFile = SD.open(curFileName, FILE_READ);
+  }
+
+  if(!myFile)
+  {
+    ShowError(1);
+    return;
+  }
+  
+  Serial.println(curFileName);
+  
+  String line = "";
+  while(myFile.available())
+  { 
+    char c = (char) myFile.read();
+
+    line += c;
+
+    if(c == '\n')
+    {
+      int val[5];
+      char *pch;
+      pch = strtok (line.c_str(), ",");
+      for(byte i = 0; i < 5; ++i)
+      {
+        if(pch == NULL)
+          break;
+        String s(pch); 
+        val[i] = s.toInt();
+        pch = strtok (NULL, ",");
+      }
+
+      set_led_rgb(val[0], val[1], val[2], val[3], val[4]);
+      
+      line = "";
+    }
+  }
+
+  myFile.close();
+
+  return 0;
 }
 
 void ShowGoomba()

#include <FastLED.h>
#include <EEPROM.h>
#include <SPI.h>

#define LED_PIN     5
#define COLOR_ORDER GRB
#define CHIPSET     WS2811

#define PIN_BRIGHTNESS A0
#define PIN_MODE 4
#define PIN_LED A1

int currentMode = 4;
#define MAXMODE 5
int eeprom_addr = 0;

long lastMillis = millis();
long currentMillis = millis();
long pauseMillis = 10 * 1000;

const uint8_t kMatrixWidth = 20;
const uint8_t kMatrixHeight = 10;

int buttonState;          
int lastButtonState = LOW;
unsigned long lastDebounceTime = 0;
unsigned long debounceDelay = 10;
byte ledvalues[200*3] = {0};
bool initFailed = false;

void setup() 
{ 
  pinMode(PIN_BRIGHTNESS, INPUT);
  pinMode(PIN_MODE, INPUT);
  pinMode(PIN_LED, OUTPUT);

  Serial.begin(9600);

  if (!SD.begin(4)) {
    initFailed = true;
  }

  currentMode = 5;
  currentMode = EEPROM.read(eeprom_addr);
  
  // LEDColorCorrection { TypicalSMD5050 =0xFFB0F0, TypicalLEDStrip =0xFFB0F0, Typical8mmPixel =0xFFE08C, TypicalPixelString =0xFFE08C, UncorrectedColor =0xFFFFFF }
