Micro:bit Physical computing guides
No. 12: Piezo Buzzer
Connecting a Piezo Buzzer to a micro:bit
Instructions on how to attach a Piezo Buzzer to a BBC micro:bit.
What you will need
Instructions on how to attach a Piezo Buzzer to a BBC micro:bit.
What you will need
- BBC micro:bit
- Micro USB cable
- Battery pack with 2 x AAA batteries
- 1 x piezo buzzer
- 2 x Crocodile clip leads
Piezo buzzer
Wiring instructions
- Disconnect the micro:bit from your computer and disconnect the battery pack.
- Using crocodile clips, connect the longer leg (or + side) to Pin 0, and the shorter leg to GND on the BBC micro:bit.
Programming your Piezo Buzzer
Copy the below:
Programming your Piezo Buzzer
Copy the below:
Testing your code
Testing your code
- Download your program to your micro:bit.
- Reconnect your battery and run your program.