Piano Lights

I connected a Raspberry Pi to my electric keyboard via USB, and also connected a strand of individually-addressable RGB LEDs. Then I wrote software to read the midi output from the keyboard, so that the LEDs light up in response to key presses.

Code