Although our Raspberry Pi has a 3.5mm TRRS audio connection, we connect our buzzer, which is much easier in this course, via GPIO pins.
We can think of Buzzer as a tiny speaker. Although they don’t sound as loud and detailed as large speakers and headphones, they can be used to create beeps. The beep that most PCs emit during the startup process is a buzzer.
Buzzers are generally two types, active and passive. An active buzzer has an oscillator circuit that internally generates its own sound. It can be ensured that they only sound by applying force. Passive buzzers, on the other hand, do not have such a circuit, so we have to use a microprocessor to create the audio signal by generating it. The buzzer used in this lesson is passive.
We will set up our circuit according to the following scheme: