if (distance >= 20) {
distance = ping();
turnRight(); // function that turns the robot right
}
If distance is greater than or equal to 20, overwrite it, and then call turnRight(). Why overwrite it?
if (distance >= 20) {
distance = ping();
turnRight(); // function that turns the robot right
}
If distance is greater than or equal to 20, overwrite it, and then call turnRight(). Why overwrite it?