Throw out those candles and opt instead for an Arduino sketch to light up those Pumpkins this year. With our simple sketch and the exclusive library it couldn’t be simpler to take your pumpkin to the next level! And remember, don’t throw out the flesh or seeds! We made a lovely pumpkin pie and two batches of roasted seeds (one sweet, one savoury). Yum! Take a look at the video from our youtube channel at the bottom of the page.
What You’ll Need
First you’ll want to carve out those pumpkins! Whether you do this with the kids, or on your own… it’s a huge amount of fun – although a little gooey! Poke a small hole in the back (bottom) of your pumpkin to push the wires through. Once carved and ready to light up it’s time to get your tech head on.
The connections for the wires are as follows:
That’s the hard part out of the way. Now download the exclusive library from our support forum here or from our github page here and be sure to place it in the correct folder.
On Windows:
My Documents\Arduino\libraries\
On Mac:
Documents/Arduino/libraries/
or similarly for Linux.
Use the sketch below to program the Arduino – It’s all commented up so you know which bits to change to alter the lights in different ways.
/* Include the HCWS2812 library */ #include "HCWS2812.h" /* Create an instance of the library */ HCWS2812 HCWS2812; void setup() { Â /* Set the R,G,B background colours to RED */ Â HCWS2812.SetBG(150, 0, 0); } void loop() { Â /* Add a random level of green to each LED to make yellow */ Â for(byte i = 0; i < 16; i++) Â Â Â RGBBuffer[GREEN][i] = random(0,150); Â Â /* Send the output buffer to the LEDs */ Â HCWS2812.Refresh(); Â /* Wait a moment before doing it again */ Â delay(random(50,100)); Â /* Clear the buffer to removed the green element */ Â HCWS2812.ClearBuffer(); }
Voila! Ghoulish Tech Pumpkin!
Hello have you got any thing that can make my prop move and talk at the same time please
We do have a range of servos…
https://hobbycomponents.com/213-motors-and-servos
…and we have an MP3 audio playback module that can play back pre-recorded sound files….
https://hobbycomponents.com/audio/1009-serial-mp3-playback-module-with-1w-speaker
But in both cases these would need to be controlled via a mirocontroller board such as an Arduino.