The Pi Candle

I spent a bit of last weekend experimenting with the Raspberry Pi, and I came up with a fake candle! I used the cap of an old Christmas light, a yellow LED, some small dowels drilled with holes, and a lot of superglue. Then I programmed it in Python using the software PWM so it flickers realistically. I didn’t use any solder, I just kind of twisted the wires together. I also made an Arduino version as well.

pi candle building the pi candle

#The Pi Candle Code

#Amanda Cole 2015

import RPi.GPIO as GPIO, time, random
GPIO.setup(26, GPIO.OUT) #26 is the LED

flame = GPIO.PWM(26,60)

____while True:

except KeyboardInterrupt:


2 thoughts on “The Pi Candle

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s