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.