3. Bug TWO

Your task is to create an obstacle avoidance program. The GoPiGo robot should drive around the room without running into any obstacles.

Look at the program below. If this program is run, what will the robot do? Connect to your GoPiGo and recreate the program to check your answer.

What part of the task is not included in the program?

What can be done to the program to fix the bug(s)? 

Modify the program so that it completes the desired task. Program your GoPiGo rover to ensure that your program does complete the task.