In this program, you use a variable to control the pitch of a speaker. By changing that variable very smoothly and quickly with code, you'll create a cool sound effect.
Read the Code Walkthrough Text (click to open)
New Concept: Unknown Variable Value
Up to this point, you could probably figure out the value of your variables just by watching your programs run, even if you weren't looking at the screen. In this program, you see something different: variables that are changing quickly and somewhat automatically.
This demonstrates the real power of a variable. It's a word that holds a value-sometimes a value you don't know. Now the program is doing work for you- taking your commands like 'add one to whatever you were before' and executing it.