 
   myservo.write(angle);
 
-  rndDelay();
+  rndDelay(2000, 4000);
   Serial.println("");
 }
 

      // right side movement
      angle = random(angle, angle + variation);
    }
    else {
      break;
    }

    myservo.write(angle);

    Serial.print("\t");
    rndDelay(4000, 6000);

    Serial.print("\t");
    int rightValue = readDetector(DETECTOR_RIGHT, "right");
