Instructions
Site: | GoLabs |
Course: | Find the Bug |
Book: | Instructions |
Printed by: | Guest user |
Date: | Wednesday, 4 December 2024, 11:57 AM |
Description
Practice debugging the distance sensor.
1. Task
Your task is to create an obstacle avoidance program where GoPiGo robot should drive around the room without running into any obstacles,
HOWEVER the programs in this activity do not work.
Your job is to find the bug(s) in each of the programs.
2. Bug ONE
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.
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.
4. Bug THREE
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.
5. Bug FOUR
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.