Pumpkin Pi

I have so much fun with my Raspberry Pi it’s almost sickening.  I can’t keep my projects and intended projects straight, bouncing from this one to that one and back.  Every once in a while though, there is one that I really get into and I stick with through the end.  Pumpkin Pi is one of those…. and probably in part because it involves that most odd and exhilarating of holidays: Halloween!

Having come across Chivalry Timbers’ article outlining how he made a Christmas light show powered by a Raspbery Pi, I decided to do the same for Halloween.  After a few modifications to his lightorgan code for PiFace compatibility, I ended up with my own working version:


The concept is really simple.  It reads the output from the ALSA sequencer as MIDI songs are played and determines which note is being played.  Each note corresponds to a GPIO pin, which is then turned on, and an LED is lit up.

My work held a pumpkin decorating competition; naturally I decided to make use of my Raspberry Pi and make what I have termed “Pumpkin Pi.”  I opted to use a dense styrofoam pumpkin rather than a real one to protect the electronics, and carved a scary face in it.  LEDs were attached inside at various places and wired to the PiFace, then the Raspberry Pi and speakers were loaded inside.

The tough part is that the Pumpkin Pi had to sit out in the main support room at work all day for everyone to view and vote on.  I couldn’t be there to demonstrate it, so I had to come up with a way for people to make it play.  I opted to whip up a simple PHP page that pulled a list of the MIDI files in the music directory and displayed them each on a button.  When the button was pressed, an async call is made to the Raspberry which initiated the lightorgan script and put a lock file in place.  Upon completion, the lock file is removed and the page is reset.  Quick and simple, but effective.

Unfortunately I didn’t win… people criticized me for not carving a real pumpkin.  But that’s okay.  I can reuse mine, and it won’t rot!

2013-10-23 16.07.40 2013-10-23 16.07.26 2013-10-23 16.07.10 2013-10-23 16.06.42

Cody (17 Posts)