 };
 direction servoRangeDirection = NONE;
 uint32_t servoLastScanTimestamp = 0;
+bool servoMoveCenterDenied = true;
 
 direction servoLastScan = NONE;
 
 // IR obstacle detection
 int obstaclePin = A7;
+int obstaclePin2 = A6;
 
 
 void setup()
 {
-    Serial.begin(115200);
     // Scanner
     pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
     pinMode(echoPin, INPUT); // Sets the echoPin as an Input

    ServoMotor.write(servoCenter);
}

void GetRange(int servoPos, bool rotating)
{
    long range = sonar.ping_cm();

    // fallback if return value is out of range
    if(range == 0 && rotating) { range = maxDistance; }
    if(range > maxDistance) { range = maxDistance; }

    
    //if(range == 0) { range = lastRange; }
    //if(range > 0  && !rotating) { lastRange = range;}

    long avgRange;

    if(servoPos == servoCenter) 
    {
        if(range == 0) { range = lastRangeCenter; }
        avgRange = (range + lastRangeCenter) / 2;
        lastRangeCenter = range;

        rangeCenter = avgRange; 
    }
    if(servoPos > servoCenter) 
    { 
        if(range == 0) { range = lastRangeLeft; }
        avgRange = (range + lastRangeLeft) / 2;
        lastRangeLeft = range;

        rangeLeft = avgRange; 
    }
    if(servoPos < servoCenter) 
    { 
        if(range == 0) { range = lastRangeRight; }
        avgRange = (range + lastRangeRight) / 2;
        lastRangeRight = range;
        
        rangeRight = avgRange; 
    }

    Serial.print(range);
    Serial.print(" - ");
    Serial.print(avgRange);
    Serial.print(" - ");
    Serial.println(servoPos);
}

bool GetObstacle()

#include "NewPing.h"

// Base Date
const uint16_t initialDelay = 1500;

// Ranges and Data
const uint8_t rangeLimit_Warning1 = 70;
