Get Help
Making Sounds (miniBloq)
Sparki’s buzzer does more than the single tone beep you have probably heard before! In this tutorial, you’ll learn how to make Sparki play music!What You’ll Need
- A Sparki.
How It Works
Sparki has a buzzer that can play various tones:Sparki and a close up of the buzzer
The voltage causes the buzzer to bend, and it outputs sound waves:
The voltage applied to the piezoelectric speaker causes it to bend and flex.
This bending and flexing moves the air around, and creates what we perceive as sound waves.
Sounds coming out of the speaker.
The closer the waves are together, the higher humans perceive the sound to be. The farther away the waves, the lower the sound. By changing the frequency with which the buzzer oscillates, we can bunch up the waves or space them out, making the sound seem higher or lower.
Programming It With Sparki
Using the buzzer from your own program is easy. For example, the following code produces just a small A note beep:





SparkiDuino Programming Environment
