 const uint16_t maxDistance = 300;
 
 NewPing sonar(trigPin, echoPin, maxDistance);
-
 
 long rangeData_Left[15];
 long average_Left;


    // Get the next Angle and Move the Servo
    ServoMotor.write(GetNextServoAngle());
    delay(25);

    // if the new servo location is different from the one before calculate an anverage
    if(servoLocation != servoLocationLast || servoMovement != servoMovementLast)

uint8_t GetNextServoAngle()
{
    // 0 - 80 / 80 - 100 / 100 - 180
    if(servoPos <= 10)
    {
        servoMovement = right;
        servoPos = 10;
    }

    if(servoPos >= 170)
    {
        servoMovement = left;
        servoPos = 170;
    }


