2.4 KiB
banana keyboard activity
build a banana keyboard
micro:bit banana keyboard
In this project, you will build your own music player micro:bit banana keyboard from household fruit. Project duration: 15 minutes.
Materials
- micro:bit, battery holder and 2 AAA batteries
- Bananas
- Orange
- Crocodile clips
Steps
Step 1
Using the 1st crocodile clip, connect the end of the crocodile clip onto GND pin on the micro:bit.
Step 2
Using the 2nd crocodile clip, connect the end of the crocodile clip onto the 0 pin on the micro:bit.
Step 3
Using the 1st crocodile clip, connect the second end of the crocodile clip onto based of the headphone jack.
Step 4
Using the 2nd crocodile clip, connect the second end of the crocodile clip onto tip of the headphone jack.
Step 5
Using the 3rd crocodile clip, connect the end of the crocodile clip onto the 1st crocodile clip already clipped onto GND.
Step 6
Using the 3rd crocodile clip, connect the unattached end of the crocodile clip onto the orange.
Step 7
Using the 4th crocodile clip, connect the end of the crocodile clip onto pin 1 on the micro:bit.
Step 8
Using the 4th crocodile clip, connect the unattached end of the crocodile clip onto the banana.
Step 9
Your banana keyboard is ready!
Step 10
Connect your micro:bit to your computer using your USB cable and run this script:
let sound = music.noteFrequency(Note.C);
input.onPinPressed(TouchPin.P1, () => {
for (let i = 0; i < 5; i++) {
sound = sound + 25;
music.playTone(sound, music.beat(BeatFraction.Sixteenth));
}
});
Tap your banana instrument to play sound against... the fruit!
~avatar boothing
Excellent, you're ready to continue with the challenges!