Connecting the sound buzzer with the ESP32

A sound buzzer has two pins. One pin is connected to the GPIO and the other is connected to the GND. We connect a sound buzzer to the ESP32 IO27 as follows:

Figure 3-10: The wiring for the sound buzzer and ESP32

Next, we write a program to access the sound buzzer device.

Get Internet of Things Projects with ESP32 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.