From the course: Raspberry Pi Weekly

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Simple connection to a speaker

Simple connection to a speaker - Raspberry Pi Tutorial

From the course: Raspberry Pi Weekly

Simple connection to a speaker

- One thing the Raspberry Pi doesn't have is a speaker. It has a speaker port and it can play sounds through the HDMI connection, but it doesn't have a speaker or a buzzer to make simple sounds. This week, let's connect a speaker and write some simple code to control that sound. Hi, I'm Mark Niemann-Ross and welcome to this week's edition of Raspberry Pi Weekly. Every week we explore the Raspberry Pi and share useful tips. For this you'll need a small speaker and some jumper wires. You won't even need a breadboard, just connect one side of the speaker to any ground pin. I've connected to the ground through pin six of the GPIO. The other side of the speaker needs to connect to a GPIO signal pin. I've suggested GPIO board pin 33, which is also known as GPIO 13. That's it. Now we have a speaker connected to the Raspberry Pi. To control it through software, I've used the GPIO Zero Library to send a pulse with modulated signal to the speaker. Pulse with modulation is an important concept…

Contents