Get spooky! Build your own Pumpkin Pi for Halloween.

Disclaimer: This is a guest blog post written by Tim Morley for the Kano blog.

Halloween Pumpkin Pi, a father & son Project

Project difficulty level: Intermediate

Hello all, my name is Tim and I've volunteered to do a little guest blog for Kano. I'm new to writing like this, so bear with me please :).

First of all, just a little background about me and (one of my) son's. I'm a 43 year old kid who has been involved technically in the print industry for the last 26 years. Maintenance and installation of multiple types of printing equipment, from tiny presses printing business cards to huge multi web newspaper presses; upgrades, AC and DC drives and PLC software changes. Alongside this, continuous improvement (making machines faster and/or more reliable) and detailed energy efficiency projects.

I'd always fancied learning “Pi” so ended up purchasing the original Kano Computer kit. My middle son whizzed through all the challenges successfully and really enjoyed it. We then decided to wipe it and allow my youngest (Tyler, pictured below) to start on it. Again he enjoyed it until he had done the vast majority of them too. After we were done with the challenges we thought about reusing it for another project.

We decided that we have to make a project to use the original Kano, and have a bit of a learning experience for both father and son. With Halloween coming up it was obvious what we had to do, it's pumpkin time!

Idea inception

Rooting through the loft we found an old plastic pumpkin that used to have a flickering lamp in the bottom that had failed, so was potentially destined for the dustbin.

To keep my sons interest I decided to do the project as small sections of no longer than 1 hour. So stage 1 was thought about together: learn how to switch LEDs in scratch and to try to make them flicker like a candle.

We lit a real candle and watched closely for colours and flickering. Initially we were going to use some RGB LEDs, but after watching we saw that we could use just red and yellow LEDs to get the effect.

We came up with the following idea to code in scratch:

  • Pick a random brightness for 1st Yellow LED
  • Pick a random brightness for 2nd Yellow LED
  • Pick a random brightness for the Red LED
  • Wait a random short time
  • Repeat

Time to get coding

That idea seemed to work in principle, so we coded it. We just has to raise the minimum brightness level a bit as it was too flickery. After testing we saw that there was too much red, so we simply removed one of the red LEDs.

The next step was to record some scary sounds. Tyler recorded them on his laptop, and then moved the files to the Kano. We used Audacity to trim the sounds and add a spooky reverb.

We connected a cheap motion detector onto GPIO4 so it would play a scary noise as somebody approached. Also added some red and green LEDs to light up during the scary sound.

We set up the Kano with VNC so we could use it with just a wifi dongle plugged in and access it via another device. This way we can power up the Kano, remotely connect and start the scratch program, and also safely shut it down too!

The next job was to add a random element to the sounds, we had 7 recordings so used a random number generator to select which one played. That worked really well, so the next job is to fit it all into the pumpkin

Final code:

Parts list:

And that's it! Do you have any ideas for projects or want to write a post on the Kano blog with your own creations? Get in touch with us on Twitter or Facebook.