Introduction
Make a piano using clothespins for the keys and our Bit Board and a micro:bit to play sounds.
Featured Document
-
-
The diagram shows what our Clothespin Piano layout looks like. You'll want to make sure you have enough room to attach your clothespins, Maker Tape, and a small LEGO baseplate with the Bit Board.
-
We used a piece of cardboard for our build. (Save those boxes!)
-
-
-
Build your circuit with the Bit Board and Piezo Speaker on top of a LEGO baseplate. You'll need a few small LEGO pieces to raise the board up on the edges.
-
Use 1/8" Maker Tape to run from the connections to the surface of your board.
-
-
-
Attach the clothespins to the board in a row. Hot glue works well to hold them down.
-
-
-
Add 1/4" Maker Tape to the top and bottom pieces of each clothespin. The top pieces will all connect to ground, and the bottom pieces will each connect to a pin on the Bit Board.
-
Connect the 1/4" pieces with the 1/8" pieces to complete all of your connections.
-
-
-
Run one long piece of Maker Tape across the top of the clothespins to the ground connection on the left side.
-
-
-
Connect a USB cable to the micro:bit and then plug it into your computer.
-
We'll be using makecode.microbit.org to program our board. It uses a simple drag and drop block interface.
-
We're going to load the following code for our Clothespin Piano program: https://makecode.microbit.org/_49EVAM2L4...
-
If you immediately hear sound you should check that all of your tape connections are pressed down securely.
-
-
-
Plug in a USB cable for power and play a tune!
-
Is a clothespin closer to a "real" piano key than a pushbutton is? Can you press more than one key at a time? What sound do you get if you do?
-
Do you like Pianos? Check out our Simple Touch Piano. our Conductive Paint Piano, and our Working Piano Necktie for more piano fun!
-
-
-
Our code is compatible with the micro:bit V1.x but if you are using a micro:bit V2 and prefer to use its built-in piezo speaker you can make the following changes to the code:
-
Change the set built-in speaker block to on
-
Delete the analog set pitch pin block from the code.
-
If you remove the Piezo Speaker you'll also need to bridge the gap created by its removal, since it has ground running through it.
-
Remove the Piezo Speaker and then place a piece of Maker Tape across the gap left by it so ground can connect.
-