Introduction: Halloween Pumpkin Light Effect With Raspberry Pi

Picture of Halloween Pumpkin Light Effect With Raspberry Pi

Use a Raspberry Pi and Pimoroni Blinkt! to create a realistic fire effect for your Halloween Pumpkin.

No more need for multiple candles and the fear of burning your house down!

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

Raspberry Pi product information and retailer links can be found at

Purchase the Pimoroni Blinkt! at or

This tutorial was originally posted on the Raspberry Pi Foundation blog at

Share your Raspberry Pi builds across social media using #RaspberryPi

Step 1: Find Yourself a Pumpkin, Pi and Blinkt!

Picture of Find Yourself a Pumpkin, Pi and Blinkt!

I used a cheap, plastic pumpkin light from a local supermarket. Originally, the pumpkin came with a small, single LED that turned on and off. Not very bright, nor realistic.

Dependant on the size of your pumpkin, choose whether to use a Raspberry Pi model 1-3 or a Raspberry Pi Zero. Either will work, though you'll need to solder header pins to the Zero.

Also, decide how you plan to power the Pi. If using a battery pack (I use one of those emergency phone chargers), will it fit in the pumpkin with the Pi?

Lastly, get yourself a Pimoroni Blinkt!. The Blinkt! is an 8 RGB LED HAT for the Pi and it's super bright and cool to play around with.

Step 2: Figure Out Your Space

Picture of Figure Out Your Space

I took the light apart to see how much space I had. It was at this point I realised I'd need to drill a hole for the USB power lead. Don't do this right away. Wait till you have the Pi inside as this will help you to figure out placement of the hole.

Step 3: Installing the Blinkt! Library

Picture of Installing the Blinkt! Library

Attach your Pimoroni Blinkt! to your Pi. For ease (and because I was yet to solder), I set up mine on a Raspberry Pi 3. Later, I swapped the SD into the Pi and attached the HAT. This also saved me finding my HDMI mini adapter as it had been stolen by work colleagues (though, in fairness, I stole it from someone else too!).

You'll need to install the Blinkt! library to your Pi. Do this by opening Terminal and typing:

curl -sS | bash

You'll then need to reboot your Pi for the changes to take effect:

sudo reboot

Step 4: Creating the Fire_effect Code

Next, you'll need to get the code from GitHub.

Open terminal once more and type:

git clone <a href=""></a>

So long as you haven't opening any other folders in terminal before entering the code, this should save the fire_effect folder into /home/pi/

To get the code to start automatically on reboot we need to update autostart. Type:

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

Within this, scroll to the end and add

@python /home/pi/fire_effect/

Lastly, reboot your Pi and the Blinkt! fire_effect should start:

sudo reboot

Step 5: You're All Done!

Picture of You're All Done!

Now you can unplug your monitor, mouse, and keyboard, place your Pi into your pumpkin and you're good to go!

I used a tissue as a diffuser to spread the glow of the light within the pumpkin. I wouldn't suggest this for long term use. Going to town on a piece of plastic with some fine sandpaper would work. Or using baking parchment or a semi-opaque bowl.

More information on the build can be found on the Raspberry Pi Foundation blog, where this tutorial originates from. Here's the link:

Have fun!


Swansong (author)2016-10-28

Very cute!

About This Instructable




More by AlexJrassic:Halloween Pumpkin Light Effect with Raspberry Pi
Add instructable to: