   return XY(x, y);
 }
 
+int pressCount = 0;
+
+char curFileName[12] = "";
+File myFile;
+long previousMillis = 0; 
+long interval = 1000;
+int currentFileIndex = 0;
+
 void loop()
 {
+  if(initFailed)
+    ShowError(2);
+  
   int brightness = analogRead(PIN_BRIGHTNESS);
   int newBrightness = map(brightness, 0, 1023, 0, 255);
-  
+
+  EEPROM.write(eeprom_addr, currentMode);
+
   bool r = isButtonPressed();
   if(r)
+    pressCount++;
+  else
+    pressCount = 0;
+    
+  if(r && pressCount <= 1)
+  {
     currentMode++;
 
+    previousMillis = millis();
+
+    FastLED.clear();
+
+    Serial.print("Mode: ");
+    Serial.println(currentMode);
+  }
+  
   if(currentMode >= MAXMODE)
     currentMode = 0;
 
-  EEPROM.write(eeprom_addr, currentMode);
-
-  FastLED.clear();
-
   switch(currentMode)
   {
-    case 0: Test(); break;
-    case 1: ShowPotValue(); break;    
-    case 2: RainbowA(); break;
-    case 3: ShowGoomba(); break;
-    case 4: ShowMario(); break;
+    case 0: 
+      FastLED.clear();
+      Test(); 
+      break;
+    case 1: 
+      FastLED.clear();
+      ShowPotValue(); 
+      break;    
+    case 2: 
+      FastLED.clear();
+      RainbowA(); 
+      break;
+    case 3: 
+      FastLED.clear();
+      ShowGoomba(); 
+      break;
+    case 4: 
+      FastLED.clear();
+      ShowMario(); 
+      break;
+    case 5: 
+      ShowFiles(); 
+      break;
   }
   
   FastLED.show();

void set_led_rgb(int x, int y, int r, int g, int b)
{
  leds[ XY(x, y) ] = CRGB( r, g, b );
}

void RainbowA()

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 }
