     if(servoPos < servoCenter) { rangeRight = range; }
 }
 
-
 bool GetObstacle()
 {
     if(analogRead(obstaclePin) < 500)
     {
+        // TODO: check if we really need servoTriggerObstacleDelayFlag
+        if(!servoTriggerActive && servoTriggerObstacleDelayFlag)
+        {
+            servoTriggerObstacleDelayFlag = false;
+            return false;
+        }
+
+        servoTriggerObstacleDelayFlag = true;
         return true;
     }
+    servoTriggerObstacleDelayFlag = true;
     return false;
 }
 

    Serial.print(rangeRight);
    Serial.print(" - ");
    Serial.println(uptime);


    GetRange(servoPos, wheelSpinCompleted);

    //SetServo(uptime, servoPos);

    // Wait for initial scans before performing any actions
    if(uptime < initialDelay)

const uint8_t rangeLimit_Stop = 25;
const uint8_t motorSpeed = 70;

const uint16_t rangeLimit_RotateFor = 250;
unsigned long rangeLimit_Timestamp = 0;
bool wheelSpinCompleted = true;

