Combine three notes to start playing a scale on Code Speaker. Then see how far you can take the code with new notes!
The code in the editor below already works. Just plug in your Code Speaker 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!
New Concept: Building blocks
Most computer code is made up of simple concepts combined together to create more complicated things. In this project, you’re still using the tone() and delay() command, just like the last project, but you’re able to build something more complex. Using these same ‘building blocks’, you can write an entire song or create a sound effect.
As your code gets more complex, try to look for the basic building blocks within the program. When you can identify the patterns, even large programs don’t feel overwhelming.