Freeze Dance





Name of Activity Freeze Dance
Author Jay Clark
Keywords program, NXT, robot, dance, conditional, loop, conditional loop, sound sensor
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 1 Hour Total
Brief Description Students program their NXT robots to dance! But wait! Using conditional loop structures, they must program their robot to stop dancing when the music stops, and start again when the music is turned back on.
Lesson Objectives: Learning about the conditional loop
Building for non-car NXT movement
Determining and implementing sensor thresholds
Materials Needed: NXT kit including a sound sensor
A source and means of amplifying music
Computers with NXT Mindstorms software
Preparation and Set Up: Clear a space in the classroom to serve as the dance floor, and mark it off with black tape (for the extensions). Set up your music system and find a volume that will register a readable sound level in the NXT.
Necessary Background A loop is a helpful programming structure that allows you to repeat a set of commands. But sometimes, you don’t want to loop forever. A conditional loop will repeat the enclosed actions until some other criterion is met. A loop can be set to run for a certain amount of cycles of the loop, for a certain amount of time, until a logic condition is met, or until a sensor threshold is broken. This activity uses the last criterion in conjunction with the sound sensor to stop the robot from dancing.

Freeze dance is a game the children play in which they must dance when the music is on, but freeze when the music is turned off. If they don’t stop, or cannot hold the position they were in when the music stopped, they are eliminated.

Threshold – The sensor value that when breached, will trigger a wait for block or a conditional loop. (Some students have had a better time understanding it as a “benchmark”)

Procedure Introduction 10 minutes Review loops with the students and why they are useful in programs.

  • Loops allow us to repeat a set of commands that would otherwise be tedious to program over and over.

Sometimes loops should go on forever. Ask the students for examples they’ve done where loops go on forever. (Simple tasks like line following, wall following). In more sophisticated programs, they should not. Ask if they can think of a situation in which you don’t want a program to go on forever. A conditional loop is a great way to end a loop exactly when you want it to end and move on to another task. Our brains use conditional loops all the time!

  •  When crossing the street, we look both ways. If its not safe, we do it again. We keep doing it until its safe, and then we cross the street.

Remind the kids or introduce them to freeze dance, and introduce the Activity. Activity 40 minutes Students should construct robots for about 15 minutes and program for at least 25 minutes. After 40 minutes is done. Put all the robots on the dance floor and start and stop the music. Clean up 5 minutes Wrap up 5 minutes

  •  What was easiest? What was hardest?
  •  What would you have done differently?
  •  What were some good ideas you saw that other groups came up with?
Extensions: Don’t bore us with those same old dance moves! Have the students’ robot switch up the dance moves after each pause.Programmatically, this involves an additional stop and a wait for sound block plus an additional looped dance sequence.

Allow students who finish quickly to explore the dance floor! have their robots move and groove while moving about the dance floor. Using their light sensor, they should detect that they’re about to leave the floor, and they should dance in a different direction. Programmatically, this would involve placing the dancing section of code in a switch or another conditional loop.

Don’t bump into other dancers! Using an ultrasonic distance sensor, detect fellow dancers and steer clear! Programmatically, this would involve placing the dancing section of code in a switch or another loop condition.

Modifications: Much of the programming could also be done with switches. Push for conditional loops if you want that to be the focus of the lesson.
Reference 1
Reference 2

Think Like a Robot





Name of Activity Think Like A Robot
Author Esha John (Created by Chandni Sanariya and Laura Nixon)
Keywords human, robot, human robot, instructions, task, command, program, loop, instructions, 1 Hour Total
Subject Non-LEGO
Grade Level 4, 5, 6
Time 1 Hour Total
Brief Description This activity can be done as as introduction to ROBOLAB. It can be combined with a
simple programming exercise. It involves one instructor acting like a robot. The goal
of the activity is to give him/her clear and concise commands in order to complete a
simple task(example : following a line).
Lesson Objectives: To teach students how a computer/robot thinks. Thus, students learn how a
programmer must think in order to program effectively.
Materials Needed: black tape (for line following)

any other props (for different tasks)

Preparation and Set Up: If line following is the task that the human robot must be programmed to do,
mark a line of tape across the floor.

Other tasks might include walking in a square, staying in a box, etc.

Necessary Background Think of what kind of specific instructions might be needed to get a robot to perform
the chosen task. Brainstorm how it might react to inaccurate or incomplete instructions.




Procedure For Line Following Paste a line of tape across the floor. Explain to the students that a robot cannot think for itself and it needs very specific instructions from them the programmers. Give them a few examples of poor instructions. (Example: asking a robot to walk forward, without pointing it in a specific direction or telling it for how long it should walk forward). Enact how the robot will act after reading these poor instructions. Split the students into groups and ask them to make a list of instructions as detailed and specific as possible, which will make a robot follow the line of black tape on the ground. Have them test their instructions, by enacting how a real robot might respond to their instructions. Have them rewrite the instructions and retest them.

Capturing the Wind: Building a LEGO Anemometer





Name of Activity Capturing the Wind: Building a LEGO Anemometer
Author STOMP
Keywords NXT, program, anemometer, data, data collection, axles, bushings, plates, rotation sensor
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 2 Hours Total
Brief Description Students will use their NXTs to build and program an anemometer that collects data.
Lesson Objectives: - To learn about methods of measuring and collecting weather data.
- To program using NXT software.
Materials Needed: NXT
Rotation sensor
plates (with holes)
thick paper/index cards/cups
tape/paper clips
Preparation and Set Up: Set up computers running MINDSTORMS.
Gather necessary materials.
Arrange students in groups of 2.
Distribute necessary materials.
  1. Have students build fan-like structure:
    1. Attach two plates in a ‘plus-sign’ design.  Be sure the holes line up where they cross!  Then take a bushing and attach it to the plates as shown.  Make sure the smooth edge faces up and the notched edge is touching the plate.
    2. Slide an axle through the plates and bushing.  It is a good idea to secure the plates with a second bushing.  Then slide the other end of the axle through a rotation sensor.  Use bushings to secure the sensor also.
    3. Use thick paper, index cards, or cups to create sails.  Tape or clip these to the plates.  Attach the rotation sensor to the RCX.  Make sure to plug the sensor into port 1.
  2. Have students write a program in investigator in ROBOLAB:
    1. Write a program in level 1 to record rotation sensor data for a certain length of time.
    2. Adjust sampling rate to a very small interval (decimal).
    3. Download and run the program to measure the speed of the fan blades as you blow on them or from outside in the wind.
  3. Have students upload and analyze the data:
    1. Upload the data to investigator.
    2. You will want to convert data from sixteenths of a rotation into full rotations. Use the compute tool to divide the data in the red bin by 16.
    3. Look and the chart and note trends. What happens when the wind blows harder? softer? How fast did the wind blow? How slow?
Extensions: Experiment with different types of arms to see what works best (different material for blades/longer blades/wider blades/narrower blades/angled blades/flat blades).
Once you’ve selected a type, try different sizes.
Reference 1

Switch to our mobile site