         distanceValues[i] = minDistance;
       }
      }
+     if(distanceValues[i] < distanceValuesFade[i]) {
+        distanceValuesFade[i] = distanceValues[i];
+     }
+     else {
+      distanceValuesFade[i] = distanceValuesFade[i] + (distanceValues[i] / 6) ;
+      
+     }
+     Serial.print("dist values FADE: ");
+     Serial.println(distanceValuesFade[i]);
    }
    
    if(digitalRead(PIN_SWITCH)) {

    //to get the with 1,2,3 the needed indices we use i*2 and i*2+1
    //0 = 0,1 / 1 = 2,3 / 2 = 4,5   
    //int distance = (distanceValues[i*2] + distanceValues[i*2+1]) / 2;
    int distance = distanceValues[i];
    int heightStrip = NUMBER_LEDS/NUMBER_STRIPS;
    
    //how many of the leds of one strip should be switched on

//Store of the measured distances of each servo step
//int distanceValues[6];
  int distanceValues[3];
  int distanceValuesFade[3];


void setup() {  
  //Init distance store to far away
  for(int i=0; i < 3; i++){
    distanceValues[i] = maxDistance;
    distanceValuesFade[i] = maxDistance;
  }
  
  pinMode(PIN_SWITCH, INPUT_PULLUP);           // set pin to input with internal pullup resistor
  
