Games on the MicroBit are way more fun when they make noise.
Here are 3 ways of making sound that I’ve tried with things I had lying around the house, in ascending order of usefulness / awesomeness:
1) A loudspeaker. I bought this one from Pimoroni for a Raspberry Pi radio project that I’ve not yet completed. I attached it using crocodile clips from a MakeyMakey kit to pins 0 and GND on the MicroBit and ran some Python code on the MicroBit like this.
Pros: loudspeakers are quite easy to find.
Cons: fragile, highly magnetic – and very quiet!
2) An old earpiece. No idea where this came from – an ancient radio perhaps. I attached the crocodile clips to the 2 pins on its jack plug.
Pros: Very loud. Cheap.
Cons: TOO loud. Do not place anywhere near your ear canal.
3) A buzzer thingy from an Arduino kit. Not sure what its proper name is, but I had a couple of these as one came with a RaspberryPi CamJam kit too.
Pros: Very loud, cheap, tiny.
Cons: None!
So the buzzer is the way to go. I want to try a buzzer from a musical birthday card, but I can’t lay my hands on one at the moment – I have a hunch they would be really good too.
I also made my own battery pack – 2 AA batteries in a holder that I took off some broken Christmas lights – attach the + side to the 3v terminal on the MicroBit, and – to the GND terminal, and I have a switchable, portable power supply for making self-contained MicroBit projects.
Thanks a bunch! Now my micro:bit is ready to help tuning my ukulele.