NXT Musical Instrument

ACTIVITY HEADER

 

 

 

Name of Activity NXT Musical Instrument
Author Jay Clark
Keywords Mary Had A Little Lamb, simple song, NXT, switches, sensors, task, instrument, wiring, math blocks, programming, loops, MINDSTORMS, Music Engineering, numerical frequency, audible, pitch, 2 Hours Total
Subject NXTs
Grade Level 4, 5, 6, 7, 8, 9+
Time 2 Hours Total
Brief Description Students will play “Mary Had A Little Lamb” and other simple songs on their NXT using switches and touch sensors. When students complete that task, they will make an instrument using other sensors, requiring wiring and math blocks in their programs.
Lesson Objectives: Learn about loops, switches, and math blocks
Introduce Musical Instrument Engineering
Understand the relationship between numerical frequency and audible pitch
Materials Needed: NXT Kit
Computer with MINDSTORMS NXT software
Necessary Background Mary had a little lamb is a simple song consisting of just three notes. The notes and corresponding lyrics are below:

E D C D E E E

ma-ry had a lit-tle lamb

D D D E E E

lit-tle lamb, lit-tle lamb

E D C D E E E

mar-y had a lit-tle lamb

E D D E D C

whose fleece was white as snow

All musical notes have a corresponding frequency. Concert A (or middle A) is 440 Hz. In order to play mary had a little lamb using a light or distance sensor, you must know the frequencies of the three notes you’re using:

C – 262

D – 294

E – 330

Vocabulary:

frequency – the rate at which a vibration occurs. Determines the pitch of a note.

Procedure Introduction Introduce switches to the students. A switch is a program structure that makes decisions based on external criteria, such as a sensor value. Introduce the lesson. Show the students the notes of Mary had a little lamb. Ask them how many touch sensors they would need to play it. Guide them to realize that they could use 2, and there are 4 opportunities for notes to play with two touch sensors: Left pressed, right pressed, both pressed, none pressed. Guide them through brainstorming how the program should look. Usually it’s hard for them to see that the second switch is required. ActivityHave the students program their robots to be able to play mary had a little lamb using switch blocks and sound blocks. When they finish, have them use another sensor and wiring and math blocks in their program to create another musical instrument. Or allow them to use switches with another sensor to set up ranges for each note.
Extensions: Play a different song!
Use touch sensors in conjunction with another sensor to set the octave.
Reference 1 http://sites.tufts.edu/stompactivitydatabase/files/formidable/g.png

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