Button and Buzzer Lab

Step 1.

Go to the Robots category and pull out "when button pressed" as the start of your program.

Pull out "play tone on note C4 from the same category.

Test it! Press the button to hear the sound.  You're done!  But we can do more...

Step 2.

Go to the Control category and add the "wait 1 secs" at the end of the script sequence.  Change the 1 to a .5 to reduce the delay between tones.

Step 3.

Now to make more music, we can use the duplicate function which will copy scripts below the area you click.

Right-click on the blue area of "play tone" and select duplicate.  A clone of "play tone" and "wait" will appear.  Drag and drop it to the bottom of the script sequence.

Step 4.

Repeat Step 3 a few times to get a couple notes up.  Change the notes by hitting the drop down on "play note" as indicated below.

Now play with it until you have a fun song!

Alternate:

You don't have to use the button to start the program.  You can use the space key or whatever trigger or input you desire!