In this challenge, we programmed the robot to do another routine when the bumper is pressed. When the Bumper Switch is pressed, the robot will turn around and the go a different way to avoid the obstacle that is hit.
Program Code of Easy C
In this code we had to program the robot to go a different routine when the bumper switch is pressed. We first made the robot go forward. Then we programmed the bumper switch. When we did that we had to make one wheel turn, both wheels stop and go forward until it hit another object.