tuxduino:
else if(distance <= CRITdistance) {
resetPREVangle();
prevmillis = millis();
while(millis() - prevmillis < 5000) {
walkBWD();
}
resetPREVangle();
ultrasoundSWITCH = 1;
stallVAR = 0;
turnRightVAR = 0;
turnLeftVAR = 0;
rotate();
}
OOPS.. Sorry tuxduino!!
You were right! It did work!!
I forgot I'd used "while" function inside my rotate function that make sure the rotate routine won't interfere by the change of "CRITdistance" value.
THANKS ALOT tuxduino!!!!
![]()