This project started as some simple flickering jack-o-lanterns I put out for Halloween. Unhappy with the simple on/off battery powered LEDs that come in most pumpkins, I decided to run a strand of pixel addressable LEDs under the display with multiple bulbs bunched together and put inside the pumpkins. I wrote a simple flickering program for Arduino that isolated the pixels placed inside pumpkins and gave everything a warm, flickering candle look.
After putting everything together, I realized that I could utilize an Arduino program I had previously written for something else to program a musical sequence on the display. Using xLights, I created a singing jack-o-lantern show set to the theme song from Mickey’s Boo To You Halloween Parade at Magic Kingdom park.
LED Pixel Strand
One 50 bulb strand of WS2811 LEDs is controlled via an Arduino Uno. The strand is connected to three pins on the Arduino. Ground, 5V, and Digital Pin #2 which functions as the data pin and controls the lights.
WS2811 Pixel Addressable LEDs
Arduino Uno Microcontroller
xLights Project Sequence
The sequencing for the LEDs was done in an open source application called xLights. It communicates with the Arduino Uno using the DMX 512 standard over USB and is defined as a controller in xLights. The program running on the Arduino is a modified version of DMXUSB_FastLED.ino created by Perry Naseck (DaAwesomeP).
This modified version disregards the FastLED library method of communicating with LEDs and instead includes the more efficient AdaFruit NeoPixel library—which supports WS2811 pixel strands. The code is constantly listening for DMX messages, that it reads into a 150 slot buffer that cycles through to set the Red, Green, and Blue value for a pixel. Those color values are then fed into the setPixelColor method of the strand and shown on it.