Wait Program!
Students work as engineers to write programs in which their LEGO robots respond to clapping hands and human touch.Copyright (left) Eirik Refsdal, Wikimedia Commons; (right) Evan-Amos, Wikimedia Commons
http://commons.wikimedia.org/wiki/File:Lego_Mindstorms_Nxt-FLL.jpg
http://commons.wikimedia.org/wiki/File:Hands-Clapping.jpg
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.
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.
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.
- CCSS.Math.Content.4.NBT.B.4 Fluently add and subtract multi-digit whole numbers using the standard algorithm.
Grade 4
Do you agree with this alignment? - CCSS.Math.Content.5.NBT.B.5 Fluently multiply multi-digit whole numbers using the standard algorithm.
Grade 5
Do you agree with this alignment? - CCSS.Math.Practice.MP1 Make sense of problems and persevere in solving them.
Grades K-12
Do you agree with this alignment?
- Test and evaluate the solutions for the design problem.
Grades 3-5
Do you agree with this alignment? - STEL-1J Develop innovative products and systems that solve problems and extend capabilities based on individual or collective needs and wants.
Grades 6-8
Do you agree with this alignment? - STEL-3D Explain how various relationships can exist between technology and engineering and other content areas.
Grades 3-5
Do you agree with this alignment? - STEL-4G Judge technologies to determine the best one to use to complete a given task or meet a need.
Grades 3-5
Do you agree with this alignment? - STEL-7I Apply the technology and engineering design process.
Grades 3-5
Do you agree with this alignment? - STEL-7R Refine design solutions to address criteria and constraints.
Grades 6-8
Do you agree with this alignment?
- CCSS.Math.Content.4.NBT.B.4 Fluently add and subtract multi-digit whole numbers using the standard algorithm.
Grade 4
Do you agree with this alignment? - CCSS.Math.Content.5.NBT.B.5 Fluently multiply multi-digit whole numbers using the standard algorithm.
Grade 5
Do you agree with this alignment? - CCSS.Math.Practice.MP1 Make sense of problems and persevere in solving them.
Grades K-12
Do you agree with this alignment?
- 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
Do you agree with this alignment?
- 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
This resource focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices- Generate and compare multiple solutions to a problem based on how well they meet the criteria and constraints of the design problem.Do you agree with this alignment?
Disciplinary Core Ideas- 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.Do you agree with this alignment?
- 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.Do you agree with this alignment?
Crosscutting Concepts- Engineers improve existing technologies or develop new ones to increase their benefits, to decrease known risks, and to meet societal demands.Do you agree with this alignment?
Do you agree with this alignment? - Generate and compare multiple solutions to a problem based on how well they meet the criteria and constraints of the design problem.
- 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
This resource focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices- 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.Do you agree with this alignment?
Disciplinary Core Ideas- Tests are often designed to identify failure points or difficulties, which suggest the elements of the design that need to be improved.Do you agree with this alignment?
- Different solutions need to be tested in order to determine which of them best solves the problem, given the criteria and the constraints.Do you agree with this alignment?
Do you agree with this alignment? - 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.
- 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
This resource focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices- Evaluate competing design solutions based on jointly developed and agreed-upon design criteria.Do you agree with this alignment?
Disciplinary Core Ideas- There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.Do you agree with this alignment?
Do you agree with this alignment? - Evaluate competing design solutions based on jointly developed and agreed-upon design criteria.
- 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
This resource focuses on the following Three Dimensional Learning aspects of NGSS:
Science & Engineering Practices- Analyze and interpret data to determine similarities and differences in findings.Do you agree with this alignment?
Disciplinary Core Ideas- There are systematic processes for evaluating solutions with respect to how well they meet the criteria and constraints of a problem.Do you agree with this alignment?
- Sometimes parts of different solutions can be combined to create a solution that is better than any of its predecessors.Do you agree with this alignment?
- 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.Do you agree with this alignment?
Do you agree with this alignment? - Analyze and interpret data to determine similarities and differences in findings.
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 (PDF), one per student
- Wait Program! Worksheet (PDF), one per student
- Wait Program! Post-Quiz (PDF), one per student
To share with the entire class:
- Wait Program! Presentation (PPTX), a Microsoft® PowerPoint® file
- computer and projector to show the presentation
- Wait Program! Presentation (pptx)
- Wait Program! Presentation (pdf)
- Wait Program! Pre-Quiz (docx)
- Wait Program! Pre-Quiz (pdf)
- Wait Program! Pre-Quiz Answer Key (docx)
- Wait Program! Pre-Quiz Answer Key (pdf)
- Wait Program! Worksheet (docx)
- Wait Program! Worksheet (pdf)
- Wait Program! Worksheet Challenge 1 Solution (docx)
- Wait Program! Worksheet Challenge 1 Solution (pdf)
- Wait Program! Worksheet Challenge 2 Solution (docx)
- Wait Program! Worksheet Challenge 2 Solution (pdf)
- Wait Program! Post-Quiz (docx)
- Wait Program! Post-Quiz (pdf)
- Wait Program! Post-Quiz Answer Key (docx)
- Wait Program! Post-Quiz Answer Key (pdf)
Completion of the associated lesson so that students are ready to create their own NXT programs using wait blocks.
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.
Before the Activity
- Gather materials and make copies of the Wait Program! Pre-Quiz (PDF) and Wait Program! Post-Quiz (PDF), one each per student. Also, make copies of the Wait Program! Worksheet (PDF), 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 (PPTX), 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
- Administer the pre-quiz by handing out paper copies (also on slide 2). Answers are provided for the teacher on slide 3.
- Challenge 1: Introduce the first design challenge using slide 4: Program the robot to move forward until it hears a clap, then turn left.
- Distribute one worksheet to each student for the challenge 1 activity.
- 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.
- 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.
- 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.
- Distribute a second blank worksheet to each student.
- Have student pairs write programs using wait blocks to accomplish this task. This challenge uses a touch sensor.
- Have student groups download their programs onto LEGO bricks and test to see if they work.
- 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.
- Note: Refer to the programming solution on slides 7-8 to check student programs.
- Administer the post-quiz by handing out paper copies (also on slide 9). Answers are on slide 10. Vocabulary are provided on slide 11.
- 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.
Pre-Activity Assessment
Pre-Quiz: Administer the three-question Wait Program! Pre-Quiz (PDF)(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 (PDF) (and slide 3).
Activity-Embedded Assessment
Worksheets & Iterations: For both programming challenges, have students first complete Wait Program! Worksheets (PDF) 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 (PDF) (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 (PDF) (and slide 10).
NXT User's Guide. Accessed Jul 17, 2013 http://goo.gl/wuhSUA
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.
Copyright
2014 by Regents of the University of Colorado; original © 2013 Curators of the University of Missouri
