Arduino Advent Calendar Day 08 - Buzzer!
Today we're going to use a Piezo Buzzer and bridge the gap between the digital world and the analogue world.
How do buzzers work?
Piezo Buzzers make a small clicking sound when a voltage is applied. What you're hearing is the Piezo element moving inside the buzzer. When you turn the voltage on and off hundreds of times a second (using Pulse Width Modulation), you'll be able to hear a tone. By changing the duty cycle (the voltage "on and offs") we can string together a bunch of tones that will be reminiscent of a 1980s computer game.
The buzzers we're using are actually (on the inside) Piezo Speakers, and not a real buzzer. Real buzzers contain internal circuitry (typically a transistor or oscillator) that limits them to making one tone (where's the fun in that).
Enough talking about it let's go and build up the circuit over at guides.littlebird.com.au .