Test the basics of your rocket’s audio messaging center with a steady beep!
The code in the editor below already works Just plug in your Code Rocket and press upload to see what it does! Tinker with it and make changes to see what each line of code controls.
Watch the videos for line-by-line explanation of how the example program works. Then you'll be ready to make some changes of your own!
Can you complete the challenges? Check the box next to the challenge to 'mark it off' once it's complete!
These are the new code concepts covered in this example program. To become a great coder, read through these concepts to learn new vocabulary.
New Concept: Code doesn’t have a ‘default’ state
You may have noticed in this program that if you don’t turn the speaker off, it just keeps playing. This code concept is simple, but it causes confusion for some new programmers. The computer doesn’t ‘know’ that the speaker is playing too long, or that it’s getting annoying, or that it ‘should’ be off. The program just runs exactly as you write it. Keeping track of what is happening in your code takes some mental practice, but it’s also helpful to write code comments for yourself, which will help you catch simple mistakes like forgetting to turn off the speaker.