Freeze Dance

ACTIVITY HEADER

 

 

 

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.

Vocabulary:
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 http://sites.tufts.edu/stompactivitydatabase/files/formidable/b3.png
Reference 2 http://sites.tufts.edu/stompactivitydatabase/files/formidable/c.jpg

Think Like a Robot

ACTIVITY HEADER

 

 

 

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.

Vocabulary:
Program

loop

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.

Switch to our mobile site