Never used your Code Speaker before? Start here!
Let’s start with basics- beep a single tone on speaker on repeat to learn about loops!
Combine three notes to start playing a scale on Code Speaker. Then see how far you can take the code with new notes!
Let the code ‘choose’ which tone to play next on your speaker. You set the speed and the range, then settle in for a wild ride!
Use the Speaker as a communications device, programming in a message to beep out in Morse code.
Bring the power of variables to your Morse code messages to make them easier to create and update.
Create a song by converting piano notes to hertz values that Code Speaker can interpret and play!
Replace the note delay with a variable so you can easily speed up or slow down the pace of your song as you ‘tune it in’.
Convert your piano notes to variables, then use your variables throughout the code to quickly create whatever song you’d like!
Automatically speed up your song each time it plays through using a speed variable. Pretty soon, it will play too fast to hear anything more than a ‘blip’!
Use a variable to change your tone every 3 milliseconds (3/1000th of a second!) and see how high of a tone you can hear!
Use a ‘for’ loop to control where your tone starts, how high it will play, and how fast it gets there. Sounds like a siren!
Use back-to-back ‘for’ loops to create a sound effect you can control to sound like a laser blaster, siren, alarm, or anything else you can code up!
Here are some example songs to modify and make your own. We recommend completing up to project 9 so you can understand how these songs are coded using variables.