The Piezo Buzzer project

In this section, we will learn how to use a Piezo Buzzer and make sounds using some in-built C functions. A Piezo Buzzer is like a small speaker capable of emitting sounds at various frequencies. A typical Piezo Buzzer is shown in the following figure:

Figure 3: A Piezo Buzzer

A Piezo Buzzer has two legs, one longer positive leg and one shorter negative leg. The negative leg is connected to the ground while the longer positive leg is usually connected to an Arduino pin via a 100 Ohms resistor.

Sometimes, you may find a small sticker pasted to the top of a brand new Piezo Buzzer that says, "Remove after washing". Do ...

Get Learn Arduino Prototyping in 10 days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.