Instructions

Site: GoLabs
Course: Find the Bug
Book: Instructions
Printed by: Guest user
Date: Thursday, 21 November 2024, 9:44 AM

Description

The programs below do not work as intended. Your job is to find and fix the bug(s).

Help us find the problems in these programs!

1. Bug ONE

The task is to create a program that tells the GoPiGo to move forward when the light levels are high and to stop when the light levels are low.

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.



1.1. ONE: Identify the Bug

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

What part of the program needs to be changed?  

What part(s) of the task does it not complete?



1.2. ONE: Fix the Bug

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.

What did you add to or change about this program?



2. Bug TWO

The task is to create a program that tells the GoPiGo to change the LED "eyes" to yellow if the light level is below 50% and to change the LED "eyes" to red if the light sensor reads above 50%.

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.




2.1. TWO: Identify the Bug

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

What part of the program needs to be changeD?

What part(s) of the task does it not complete?


2.2. TWO: Fix the Bug

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.

What did you add to or change about this program?



3. Bug THREE

The task is to create a program that tells the GoPiGo to move in different ways based on the light level. In lower light levels, the GoPiGo will drive forward, in mid-range light levels the GoPiGo will drive backwards, in higher light levels the GoPiGo will turn left.

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.




3.1. THREE: Identify the Bug

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

What part of the program needs to be changed?

What part(s) of the task does it not complete?


3.2. THREE: Fix the Bug

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.

What did you add to or change about this program?


4. Bug FOUR

The task is to create a program that tells the GoPiGo to drive forward for a variety of distances, take a light sensor reading, turn a random number of degrees. The GoPiGo should repeat this process 10 times.

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. **Build the program in ADVANCED BLOXTER. **



4.1. FOUR: Identify the Bug

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

What part of the program needs to be changed?

What part(s) of the task does it not complete?


4.2. FOUR: Fix the Bug

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.

What did you add to or change about this program?