Piezo buzzer
A small speaker that beeps, plays sounds and melodies: for alerts, alarms and games.
The test program
Test this part on its own before you build the rest: if it works alone, the rest is built on something you know works.
10 SOUND "coin"
20 WAIT 1000
30 GOTO 10What you should see: The buzzer makes a short sound every second.
▶ Try it in the IDEWhat to buy
- Passive buzzer
How to wire it to an ESP32-S3
- + → ESP32-S3: GPIO5
- − → ESP32-S3: GND
If it does not work
- The program runs but nothing happens
- The signal does not reach the buzzer: the wire is on the wrong pin, or the negative pole is not on GND. The signal goes to the pin shown in the diagram, the negative pole to GND.
Which boards it works on
- ESP32-S3 Freenove: yes
- Nordic nRF54LM20 DK: yes
- Arduino UNO R4 WiFi: yes