Programming Highlights

 
bullet

Solving a problem with or with out a sensor

bullet

Understanding the problem

bullet

What Happens on the release?

 

Students will write a program to have Roverbot go forward until it hits something; go backward; turn a bit, and move forward again. This problem can be solved many different ways, and you should expect to see some variety in the programs different groups write. In the following example we hope to capture some of the important aspects of programming a robot to act on sensory input. We hope that these highlights will help you identify patterns in students thinking and guide them as they modify their programs.

 

 

Solving a problem with or without a sensor.

Here are two ways to solve the “walk to the wall, touch it and stop” problem. Recalling this problem can help students think about the new, somewhat more complex problems.

Return to Top

 

Understanding the problem

Some problems seem simple at first. And, indeed, they would be simple if a person had to carry out the task. But when a problem has to be represented so a robot could follow the directions, it has to be broken into mini operational steps. It is important for the students first to convert the problem into small chunks solved by a person, and only then translate these chunks into RIS language. The sequence titled Breaking the problem into manageable steps shows how one solution to this problem can be constructed a step at a time.

Return to Top

What happens on the release?

 We recommend using the following examples as a class discussion after students have solved the problem. Using it earlier will give away the solution.

In the PressRelease program, there are commands in both the Press and Release stacks. When the sensor is pressed, it reverses direction. Then, when the sensor is released, it carries out the stack in the Release branch.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Return to Top