While browsing the Halloween section of my local supermarket, I stumbled across this adorable pumpkin light for £2. Given the fact I had a £2 coin in my pocket and an itching for a Halloween hack project, it came home with me at once.

You’ll see, if you look hard enough, the small orange LED within the plastic shell. Controlled by a switch beneath, the light was less than impressive once illuminated.

And so the hack seed was planted.

Now, I’ll admit to not having much coding knowledge. But what I lack in skills, I make up for in charm, and it didn’t take long for me to find help from a couple of Raspberry Pi staffers.

Pimoroni had been nice enough to send us some Blinkt! units a while back and while one is being used for our People in Space Indicator, I’d been wanting to use one myself for some sort of lighting effect. So, with their Getting Started guide in hand (or rather, on screen), I set up the Raspberry Pi 3 that lives on my desk, attached the Blinkt! HAT and got to work on creating this…

Halloween Pumpkin Light Effect Use a Raspberry Pi and Pimoroni Blinkt! to create an realistic lighting effect for your Halloween Pumpkin. Learn how at www.

If you’d like to create your own pumpkin light effect, you’ll need:

A Raspberry Pi (Make sure you use one that fits in your pumpkin!)

A Pimoroni Blinkt!

A power supply (plus monitor, mouse, and keyboard for setup)

A pumpkin

Take your Blinkt! and attach it to your Pi. If you’re using a 1-3 model, this will be easy enough, but make sure the Pi fits in your pumpkin! If, like me, you need to go smaller, you’ll have to solder your header pins to a Zero before attaching the HAT.

You might want to make sure Raspbian is running on the newest version. Why? Well, why not? You don’t have to upgrade to PIXEL, but you totally should as it’s very pretty. Its creator, Simon Long, was my soldering master for this project. His skills are second to none. To upgrade to Pixel, follow the steps here.

In the terminal, you’ll need to install the Pimoroni Blinkt! library. Use the following to achieve this:

curl -sS get.pimoroni.com/blinkt | bash

You’ll need to reboot the Raspberry Pi to allow the changes to take effect. You can do this by typing:

sudo reboot

At this point, you’re more than welcome to go your own way with the Blinkt! and design your own light show (this may help). However, and with major thanks to Jonic Linley, we’ve created a pumpkin fire effect for you.

Within the terminal, type:

git clone https://github.com/AlexJrassic/fire_effect.git

This will bring the code to your Raspberry Pi from GitHub. Next, we need to tell the Raspberry Pi to automatically start the fire_effect.py code when you power up. To do this, type:

nano ~/.config/lxsession/LXDE-pi/autostart

At end of the file, add this line:

@python /home/pi/fire_effect/fire_effect.py

Save and then reboot:

sudo reboot

Now you’re good to go.

To add more of a spread to the light effect, I created a diffuser to cover the Blinkt! LEDs. In the video above, you’ll see I used a tissue. I wouldn’t suggest this for prolonged use, due to the unit getting a little warm; I won’t be responsible for any subsequent tissue fires. I would suggest using a semi-opaque bowl (the ones you get a Christmas pudding in) or a piece of plastic from a drinks bottle, and go to town on it with some fine sandpaper.

We also drilled a small hole in the back for the micro-USB lead to reach the Zero. I used a battery pack for power, but you could use a lead directly into the mains. With a larger pumpkin, you could put a battery pack inside with the Pi.

If you use this code, please share a photo with us below, or across social media. We’d love to see what you get up to.

And if you want to buy the Blinkt!, the team at Pimoroni have kindly agreed to extend the cut-off for postage on Friday from midday to 3pm, allowing you the chance to get the unit through your door on Monday (so long as you live in the UK). You can also purchase the Blinkt! from Adafruit if you live across the pond.