- Introduction
- Connecting the hardware
- Changing the tempo (speed)
- Adding a rest (silence)
- Challenge 1
- Challenge 2
- Challenge 3
- Challenge 4
- Resources
Microbit sound and music tutorial
In this tutorial we will cover all the hardware and coding you will need in order to output sound and music on the Microbit. The tutorial includes a demonstration on how to connect up speakers and buzzers, as well as the basics of coding music.
In order to play music on the Microbit we need to use the codethemicrobit.com website. Click on the button below to launch the site.
Codethemicrobit.comOutputting sound on the Microbit is easy, you just need the following ingredients:
- BBC Microbit
- Battery pack and batteries
- 2 Crocodile clips
- Speaker(louder) or Buzzer(quieter)
Connecting a Piezo buzzer to the Microbit
Connecting buzzers / speakers without a breadboard
You can connect up either a speaker, buzzer or headphones – the principle is the same for all the devices!
You don’t have go out an buy a speaker to get this working either – I recycled mine from an old radio that I had spare, but make sure you ask the person who owns the device before you take it apart, you might get in trouble!
Changing the music tempo(speed)
If you want to change the speed of the music piece then you should change the tempo
Example
- Tempo = 60 Beats per minute
- so 1 beat equals 1 second
- 1/2 a beat equals 1/2 a second
If you want to add a pause to your musical creation, you should add a rest!
How long the silence lasts will depend on the number of beats and the tempo of the music.