My latest Raspberry Pi B+ project is a Melody Maker inspired by the mini-game ‘Music Machine’ from the electronic Merlin toy. Coded in Python and built with five common anode RGB LEDs and five pull-down resistor buttons each representing a different note on the C major scale, the records the “notes” (i.e. a press of a button) and adds them to the melody. When you press the smaller 6mm button, the “play” button, you hear the melody on the piezo buzzer.
Although it doesn’t have as many notes as the 10 note Merlin game, this Raspberry Pi version the way I coded it can hold a virtually infinitely long melody, while Music Machine can only remember a limited amount. The Merlin unit is shown below.
Check out the Python 3 code here. There’s lots of comments plus a more detailed component list.