     while(measurements[iRight] < horizonDist){
       iRight = nextIndex(iRight,stepsInFullTurn);
       intervalWidth++;
+      nbrOfRightChecks++;
     }
     if(intervalWidth > lenLargest){
       lenLargest = intervalWidth;

    }
    
    i=iRight;
  }
  
  return iLeftLargest<iRightLargest ? 

}

void loop(){
  measure();
  Serial.println(arrayToString(measurements,stepsInFullTurn));
  delay(1000);
  stepsToCylinder = findCylinder();
  for(int i=0; i<stepsToCylinder; i++){
    rotateStep(counterClockwise);
  }
  delay(4000);
}

// Performs full turn and saves measurements to array
