Piezo buzzers are simple devices that can generate basic beeps and tones.  They work by using a piezo crystal, a special material that changes shape when voltage is applied to it.  If the crystal pushes against a diaphragm, like a tiny speaker cone, it can generate a pressure wave which the human ear picks up as sound.  Simple change the frequency of the voltage sent to the piezo and it will start generating sounds by changing shape very quickly!

This guide will explore how to generate tones with a piezo from CircuitPython or Arduino code. 

With CircuitPython, you can use simple Python code to play beeps and music notes with the piezo.  You can even use the CircuitPython REPL to make sound interactively!

In addition this guide will also show basic piezo control with Arduino code too, so you can use it for either!

Last updated on 2018-01-05 at 02.34.17 PM Published on 2018-01-05 at 02.36.17 PM