Register here for our virtual August engineering design Professional Development workshops!

# Hands-on ActivityWait Program!

(0 Ratings)

### Quick Look

Time Required: 45 minutes

Expendable Cost/Group: US \$0.00

This activity uses non-expendable (reusable) LEGO robots and computers; see the Materials List for details.

Group Size: 2

Activity Dependency:

Subject Areas: Computer Science, Science and Technology

NGSS Performance Expectations:

 3-5-ETS1-2 3-5-ETS1-3 MS-ETS1-2 MS-ETS1-3

### Summary

After completing the associated lesson, students test their understanding in two programming tasks that utilize LEGO® MINDSTORMS® NXT robots and sound/touch sensors. In the first challenge, students become acquainted with wait blocks by designing programs to simply make robots move forward until "hearing" a noise, and then turn left. The second, more challenging activity pushes students to fully understand the potential of wait blocks. They create programs that make the robots change speed several times when a touch sensor is pressed. Students gain practice in the iterative design-program-test-redesign process. A PowerPoint® presentation, pre/post quizzes and worksheet are provided. **Note: This activity uses the retired LEGO NXT robot which is no longer available for purchase.
This engineering curriculum aligns to Next Generation Science Standards (NGSS).

### Engineering Connection

Engineers and scientists frequently write programs to assist them in solving problems. Often, these programs perform simulations or mathematical operations to help them analyze the results of many different inputs. As a result, computer programs must be flexible enough to deal with variable conditions, not just one specific case. For example, if programming a calculator, the program must be able to operate on any two numbers that might be entered.

In the first lesson in the unit, the programs were only good for navigating through a maze with precisely the given measurements. In the calculator example, this is analogous to being able to compute 1+2 correctly but not accounting for any other possible inputs. Using wait blocks, we can program robots to account for variable conditions, for instance, to move forward any distance until running into a wall. The skill of designing solutions that can handle a variety of conditions is incredibly useful in engineering and in life.

### Learning Objectives

After this activity, students should be able to:

• Program the LEGO MINDSTORMS NXT robot using sensors to accomplish useful tasks.
• Explain how the wait block functions and provide reasons for using it in programming LEGO robots.

### Educational Standards Each TeachEngineering lesson or activity is correlated to one or more K-12 science, technology, engineering or math (STEM) educational standards. All 100,000+ K-12 STEM standards covered in TeachEngineering are collected, maintained and packaged by the Achievement Standards Network (ASN), a project of D2L (www.achievementstandards.org). In the ASN, standards are hierarchically structured: first by source; e.g., by state; within source by type; e.g., science or mathematics; within type by subtype, then by grade, etc.

###### NGSS: Next Generation Science Standards - Science
NGSS Performance Expectation

3-5-ETS1-2. Generate and compare multiple possible solutions to a problem based on how well each is likely to meet the criteria and constraints of the problem. (Grades 3 - 5)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Generate and compare multiple solutions to a problem based on how well they meet the criteria and constraints of the design problem.

Alignment agreement:

Research on a problem should be carried out before beginning to design a solution. Testing a solution involves investigating how well it performs under a range of likely conditions.

Alignment agreement:

At whatever stage, communicating with peers about proposed solutions is an important part of the design process, and shared ideas can lead to improved designs.

Alignment agreement:

Engineers improve existing technologies or develop new ones to increase their benefits, to decrease known risks, and to meet societal demands.

Alignment agreement:

NGSS Performance Expectation

3-5-ETS1-3. Plan and carry out fair tests in which variables are controlled and failure points are considered to identify aspects of a model or prototype that can be improved. (Grades 3 - 5)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Plan and conduct an investigation collaboratively to produce data to serve as the basis for evidence, using fair tests in which variables are controlled and the number of trials considered.

Alignment agreement:

Tests are often designed to identify failure points or difficulties, which suggest the elements of the design that need to be improved.

Alignment agreement:

Different solutions need to be tested in order to determine which of them best solves the problem, given the criteria and the constraints.

Alignment agreement:

NGSS Performance Expectation

MS-ETS1-2. Evaluate competing design solutions using a systematic process to determine how well they meet the criteria and constraints of the problem. (Grades 6 - 8)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Evaluate competing design solutions based on jointly developed and agreed-upon design criteria.

Alignment agreement:

There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.

Alignment agreement:

NGSS Performance Expectation

MS-ETS1-3. Analyze data from tests to determine similarities and differences among several design solutions to identify the best characteristics of each that can be combined into a new solution to better meet the criteria for success. (Grades 6 - 8)

Do you agree with this alignment?

Click to view other curriculum aligned to this Performance Expectation
This activity focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices Disciplinary Core Ideas Crosscutting Concepts
Analyze and interpret data to determine similarities and differences in findings.

Alignment agreement:

There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.

Alignment agreement:

Sometimes parts of different solutions can be combined to create a solution that is better than any of its predecessors.

Alignment agreement:

Although one design may not perform the best across all tests, identifying the characteristics of the design that performed the best in each test can provide useful information for the redesign process—that is, some of the characteristics may be incorporated into the new design.

Alignment agreement:

###### Common Core State Standards - Math
• Make sense of problems and persevere in solving them. (Grades K - 12) More Details

Do you agree with this alignment?

• Fluently add and subtract multi-digit whole numbers using the standard algorithm. (Grade 4) More Details

Do you agree with this alignment?

• Fluently multiply multi-digit whole numbers using the standard algorithm. (Grade 5) More Details

Do you agree with this alignment?

###### International Technology and Engineering Educators Association - Technology
• Test and evaluate the solutions for the design problem. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Explain how various relationships can exist between technology and engineering and other content areas. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Apply the technology and engineering design process. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Judge technologies to determine the best one to use to complete a given task or meet a need. (Grades 3 - 5) More Details

Do you agree with this alignment?

• Develop innovative products and systems that solve problems and extend capabilities based on individual or collective needs and wants. (Grades 6 - 8) More Details

Do you agree with this alignment?

• Refine design solutions to address criteria and constraints. (Grades 6 - 8) More Details

Do you agree with this alignment?

###### Missouri - Math
• Make sense of problems and persevere in solving them. (Grades K - 12) More Details

Do you agree with this alignment?

• Fluently add and subtract multi-digit whole numbers using the standard algorithm. (Grade 4) More Details

Do you agree with this alignment?

• Fluently multiply multi-digit whole numbers using the standard algorithm. (Grade 5) More Details

Do you agree with this alignment?

###### Missouri - Science
• Describe how new technologies have helped scientists make better observations and measurements for investigations (e.g., telescopes, electronic balances, electronic microscopes, x-ray technology, computers, ultrasounds, computer probes such as thermometers) (Grade 5) More Details

Do you agree with this alignment?

Suggest an alignment not listed above

### Subscribe

Get the inside scoop on all things TeachEngineering such as new site features, curriculum updates, video releases, and more by signing up for our newsletter!
PS: We do not share personal information or emails with anyone.

### Materials List

Each group needs:

• LEGO MINDSTORMS NXT robot, such as the NXT Base Set; follow the taskbot building instructions in the base set manual; sensors are included in the base set
• LEGO MINDSTORMS Education NXT Software 2.1
• computer, loaded with NXT 2.1 software
• Wait Program! Pre-Quiz, one per student
• Wait Program! Worksheet, one per student
• Wait Program! Post-Quiz, one per student

To share with the entire class:

### More Curriculum Like This

Upper Elementary Lesson
How Do You Make a Program Wait?

Building on the programming basics learned so far in the unit, students next learn how to program using sensors rather than by specifying exact durations. Working with the LEGO® MINDSTORMS® EV3 robots and software, they learn about wait blocks and how to use them in conjunction with move blocks set ...

Upper Elementary Lesson
How Do You Make Loops and Switches?

Students learn how to program using loops and switches. Using the LEGO® MINDSTORMS® robots, sensors and software, student pairs perform three mini programming activities using loops and switches individually, and then combined.

Upper Elementary Lesson
What Is a Program?

Using a few blindfolds and a simple taped floor maze exercise, students come to understand that computers rely completely upon instructions given in programs and thus programs must be comprehensive and thorough. Students create and test basic programs, first using just the LEGO intelligent brick, an...

Upper Elementary Unit
What Is a Computer Program?

Through four lesson and four activities, students are introduced to the logic behind programming. Starting with very basic commands, they develop programming skills while they create and test programs using LEGO® MINDSTORMS® robots. The unit is designed to be motivational for student learning, so th...

### Pre-Req Knowledge

Completion of the associated lesson so that students are ready to create their own NXT programs using wait blocks.

### Introduction/Motivation

It is very important in programming to know how to use a "conditional" statement. This means the program tells a computer or robot to do something IF a particular event happens.

In robots, sensors provide information about the environment around the robot, and this input helps robots decide what to do. For example, a robot might stop if an object is in front of it, or wait until it hears a clap and then move left. The ability to respond in this way makes the robots more useful. Today's activity will help you learn how to implement such "conditional" statements.

### Procedure

Before the Activity

• Gather materials and make copies of the Wait Program! Pre-Quiz and Wait Program! Post-Quiz, one each per student. Also, make copies of the Wait Program! Worksheet, two each per student, for the two programming challenges. The quizzes and worksheet are provided as separate attachments, and also embedded in the presentation to make it easier to go through them as a class, if desired.
• Assemble a LEGO MINDSTORMS NXT taskbot for each group, following the instructions in the base set manual.
• In advance, perform the entire activity so as to be familiar with all details, especially the programming solutions on slides 5 and slides 7-8.
• Present the activity challenges and background information to students using the 11-slide Wait Program! Presentation, a PowerPoint file. Set up a computer/projector to show the presentation to the class.
• Arrange for enough computers so you have one for each student group. Make sure each computer has the LEGO software loaded.

With the Students

1. Administer the pre-quiz by handing out paper copies (also on slide 2). Answers are provided for the teacher on slide 3.
2. Challenge 1: Introduce the first design challenge using slide 4: Program the robot to move forward until it hears a clap, then turn left.
3. Distribute one worksheet to each student for the challenge 1 activity.
4. Divide the class into student pairs. Direct them to work together to program their robots to complete the task using wait blocks, which they learned about in the associated lesson. This challenge uses a sound sensor.
5. Once student groups have designed their programs, give them the following instructions:
• Attach the sound sensor to the robot using instructions given in the base set manual. Then attach the sound sensor to port 2 of the LEGO brick.
• Make sure the battery is fully changed. Then press the orange button to turn on the LEGO brick and plug it into the computer.
• Download the program onto the LEGO brick by clicking the gray down arrow in the bottom right corner of the computer screen.
• Test the program to verify that it works as desired to meet the challenge. As necessary, troubleshoot and fix any problems and re-download the program until it is successful.
• Note: The programming solution is provided for the teacher on slide 5.
1. Challenge 2: Use slide 6 to introduce a more challenging task that uses wait blocks: Write a program so that your robot:
• Remains at rest until you press the touch sensor.
• Once you press the touch sensor, moves slowly forward until you press the touch sensor again.
• Once the touch sensor is pressed a second time, moves twice as fast.
• Once the touch sensor is pressed a third time, moves twice as fast as before.
• Once the touch sensor is pressed a fourth time, stops.
1. Distribute a second blank worksheet to each student.
2. Have student pairs write programs using wait blocks to accomplish this task. This challenge uses a touch sensor.
3. Have student groups download their programs onto LEGO bricks and test to see if they work.
4. Reinforce the engineering design process and how it is an iterative process. Like engineers, students typically must iterate their initial designs many times in order to get them just right and fix any problems in their programs. Learning to do this "iteration" is important to be a successful scientist or engineer, or anyone working to achieve the best solution to a problem.
5. Note: Refer to the programming solution on slides 7-8 to check student programs.
6. Administer the post-quiz by handing out paper copies (also on slide 9). Answers are on slide 10. Vocabulary are provided on slide 11.

### Vocabulary/Definitions

algorithm: A clear and specific procedure for solving a problem in a finite number of steps.

conditional command: A command in which the completion of an action depends on a condition being satisfied. (For example, if I see a stop sign [condition], I stop [action].)

engineering design process: A series of steps used by engineering teams to guide them as they develop new solutions, products or systems. This is a cyclical process that requires engineers to test and redesign prototypes as often as it takes so they end up with reliable finished solution.

iteration: Doing something again.

stimulus: Something that rouses or incites to activity. For the purposes of the lesson, it is an action that can be perceived by the robot that causes it to move on to the next part of the program.

### Assessment

Pre-Activity Assessment

Pre-Quiz: Administer the three-question Wait Program! Pre-Quiz (also on slide 2) to assess students' retention of knowledge about conditional commands, wait blocks and move blocks from the associated lesson. Answers are provided on the Wait Program! Pre-Quiz Answer Key (and slide 3).

Activity-Embedded Assessment

Worksheets & Iterations: For both programming challenges, have students first complete Wait Program! Worksheets to ensure they have good ideas of what they want to program and to guide them through the program development design process. Like engineers, it is extremely rare for students to create programs that navigate the robots perfectly through the maze the first time, so do not be worried if students take some time and repeated efforts to do this. The teacher should, however, know the solution well (provided in the slides) and ask pertinent questions to guide students to successful solutions. Review students' worksheet answers to gauge their comprehension of the concepts covered.

Post-Activity Assessment

Post-Quiz: Have students complete the Wait Program! Post-Quiz (also on slide 9), which presents two of the same questions as the pre-quiz, as well as a review of the concept of an algorithm. Expect students to be able to provide more informed responses to the post-quiz questions after completing the activity. Answers are provided for the teacher on the Wait Program! Post-Quiz Answer Key (and slide 10).

### References

NXT User's Guide. Accessed Jul 17, 2013 http://goo.gl/wuhSUA

© 2014 by Regents of the University of Colorado; original © 2013 Curators of the University of Missouri

### Contributors

Riaz Helfer, Pranit Samarth, Satish S. Nair

### Supporting Program

GK-12 Program, Computational Neurobiology Center, College of Engineering, University of Missouri

### Acknowledgements

This curriculum was developed under National Science Foundation GK-12 grant no. DGE 0440524. However, these contents do not necessarily represent the policies of the National Science Foundation, and you should not assume endorsement by the federal government.