Skip to content
PumpkinPi code and examples
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes 👾 Added .gitattributes & .gitignore files Dec 20, 2017
.gitignore Update Nov 6, 2018

PumpkinPi - Sample Code

Here you will find three different code examples to get you started with the PumpkinPi from ModMyPi.

There is a pre-assembled Pumpkin for you to get your Halloween spook on with.

As the name of the file implies, this simply turns on all the LEDS on the board.

This script simply turns each led on then off in sequence.

The PumpkinPi class. To use include:

from pumpkinpi import PumpkinPi

pumpkin = PumpkinPi()

This class uses gpiozero and the PumpkinPi board can be set up as either a set of LEDs which can be on or off. Or it can be setup as a PWM style LED board with the following:

pumpkin = PumpkinPi(pwm=True)

This script will randomly turn on/off the leds at random brightnesses.

Download and Run

To download the sample code simply run the following command:

git clone

To run the sample code:

cd Programmable-Pumpkin
sudo python
You can’t perform that action at this time.