Midi piano practise encourager using Arduino and Sugru

The Piano Matic 3000 was a present for my daughter’s 7th birthday, to encourage her to practise the piano more often. It’s powered by a 9v battery and connected to our Yamaha p70 electronic piano.

It does two things. Under the half ping pong ball (attached with epoxy and sugru) is an RGB led. Different notes make different colours: C is red, D is green, E is blue. Black keys are random colours.

As you play, it counts the notes and lights LEDs at each threshold.

When I received this tweet from Tom Standage, I realised I’d made a mistake in the code, counting both note starts and note ends. I’ve corrected this in the code below, but not tested it yet.

The schematic is in the code below – I used 2-300 ohm resistors on all the LEDs. There’s also a rather superfluous light in the power switch. If no notes are played for 20 seconds, the power switch light starts to flash, to warn you that the battery is still being used. You’ll also need to install the Midi Library.