Passive Buzzer
Overview
A passive buzzer that can generate sounds of different pitches using PWM signals.


Supported GPIO
- Raspberry Pi 0~4
- Raspberry Pi 5
- BeagleBone Black/Green
- Jetson Nano
Commands
[INIT]
Enters initial configuration settings.
Item | Type | Description |
---|---|---|
PWM Pin | WRITE | Select the pin to output PWM signals. |
[BUZZ]
Generates buzzer sound at the specified frequency.
Item | Type | Description |
---|---|---|
Direct Frequency Input | WRITE | If true, enter frequency directly; if false, select musical notes. |
Frequency (Hz) | WRITE | Generate buzzer sound at the entered frequency. |
Musical Note | WRITE | Generate buzzer sound using musical notes. |
Use Duration | WRITE | If true, buzzer sound is generated only for the duration; if false, it continues indefinitely. |
Duration | WRITE | Enter the time to maintain the buzzer sound. |
[STOP]
Stops the buzzer sound.
Example
Objective
When the button widget on the dashboard is pressed, play the Do-Mi-Sol scale using the buzzer.
Parts
Part | Quantity |
---|---|
Raspberry Pi 4 * | 1 |
Passive Buzzer | 1 |
* Other hardware can also be used. Refer to Supported GPIO.
Wiring
Connect the following pins horizontally to each other.
Buzzer | GPIO |
---|---|
+ | 12 |
– | GND |

Project Links