Introduction: Jack-O-Lantern Lights With Arduino
This shows how to use an Arduino to control and power addressable LEDs, WS2812, to illuminate a pumpkin.
We've tested modes that look like a candle, a strobe and multi color fade.
This instructable demonstrates this using an RGB breakout board connected to an Arno and to an Arduino compatible.
This is a fun intro into using addressable LEDs which make using RGB LEDs MUCH easier. We've used strings for various projects and are planning a few projects for Christmas. We'll keep you posted.
Step 1: Parts
For this project you'll need a breakout board with addressable RGB LEDs or a few LEDs on a strip. We used a board we make called the Arno Digital RGB Add On. It is a breakout board with 3- WS2812 LEDs and a 2x3 header for easy connection to an Arduino compatible. Also, needed is an Arduino compatible, we used an Arno, and a power supply.
- Digital RGB Add On
- Arno board
- USB battery pack or other power supply
- pumpkin, we're using a synthetic pumpkin, but any will do if moisture is controlled
Step 2: Connections
Using an Arno and Digital RGB Add On board.
The Digital RGB Add On is designed to plug into the Arno, or other Arduino, ICSP header.
It comes with two sets of headers, depending on what you are plugging into. For an Arno, use the machined headers, female on the Arno, male on the Add On. For an Arduino board, use the appropriate gender of square headers.
Once it's plugged in, you'll need to load the code.
Connect a small number of WS2811 or WS2812 LEDs to an Arno or Arduino. Connect to 5V, GND and SPI pin.
One the RGBs are connected and the Arduino or Arno are programmed, you can power the board from the USB charging batter.
Step 3: The Program
The attached sketch has three modes and is set up to allow two of them to be controlled by buttons, for testing. When you pick the mode you like, just call that function.
The sketch uses the HSV to RGB function from the demo code. HSV is for hue, saturation, value. http://en.wikipedia.org/wiki/HSL_and_HSV
This makes entering color values easier, for some cases.
The strobe function turns the RGBs into a strobe light. Change the the delays to change the speed of the strobe.
The flame functions simulates a candle flame. The effect varies depending on what color the light reflects off of. So, you can change the settings to make it work for you.
The fade function is for a gentle, fading change of the colors.