   
     //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*2] + distanceValues[i*2+1]) / 2;
+    int distance = distanceValues[i];
+    if(distance < minDistance) {
+      if(distance == 0) {
+        distance = maxDistance; 
+      }  
+      else {
+        distance = minDistance;
+      }
+    }
     int heightStrip = NUMBER_LEDS/NUMBER_STRIPS;
     
     //how many of the leds of one strip should be switched on

  
    //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;    
    Serial.println(distance);
    int heightStrip = NUMBER_LEDS/NUMBER_STRIPS;
    
    //how many of the leds of one strip should be switched on

  
  //Set servo to init position
  //And wait for the servo reaching the position
//  servo.attach(PIN_SERVO);
//  servo.write(servoPos);
//  delay(5*360);
}

/**
