# LED Lightbox

## Overview

When I was young, my family had a lightbox as part of our holiday decorations.&nbsp; No one could remember where it came from, probably a garage sale or something.&nbsp; It was extremely simple -- just six old-fashioned "blinker" Christmas tree lights behind a pane of textured acrylic that turned each light into a diamond pattern.&nbsp; The lights blinked on and off at random intervals.&nbsp; Each light was always the same color and there were only six of them, but something about it was... hypnotic.

One year it fell to the floor and broke.&nbsp; No big loss, everyone said, yet I'd never seen another one like it.&nbsp; Since then, I've always wanted to find another one.&nbsp; Years later, when I saw Adafruit's strings of 12mm LED pixels, I knew exactly what I wanted to make...

![](https://cdn-learn.adafruit.com/assets/assets/000/020/162/medium800/led_pixels_IMG_1398.jpg?1413229347)

Of course, this lightbox does much more than the original ever could.&nbsp; The RGB LEDs can create any color.&nbsp; And because it's all controlled by an Arduino, they can create different coordinated patterns instead of just blinking.&nbsp; Read on for descriptions of what the code already does, or you can edit the code to add your own new patterns.

&nbsp;

This project's code randomly displays many different patterns.&nbsp; The video below shows specially modified code to demonstrate all the patterns in the following order:

- Blinker bulbs, if old-fashioned blinkers could also fade to different colors, fade to new locations or flicker on/off.&nbsp; Random blinking is the default mode when no other effects are running.&nbsp; The video shows only a 2 second delay between each on/off effect; the unmodified code imposes a random delay.
- Tracers that chase across the field and bounce off the edges.&nbsp; The video first shows one tracer alone, then three simultaneously.
- Rapid scrolling of the entire field.&nbsp; The video shows this happening very suddenly, normally it doesn't follow so closely on the heels of a previous pattern.
- Conway's "Game of Life" (sorta), where each LED lights or fades based on the number of lit neighbors.
- A starfield, which lights all LEDs with a dim background color and random LEDs flare bright white.
- Blinkenleitz (for lack of a better name), where random LEDs flare brightly in random colors against a black background.
- A game of 2048, played randomly.&nbsp; Unfortunately for my ego, random play is nearly as successful as my own.
- Waves of random colors, spreading from a random point and consuming the entire field.
- Undulating/twinkling waves of colors, spreading across the entire field.&nbsp; The effect may remind you of looking up at the light through the surface of rippling water, or a flickering bed of coals in a dying fire, depending on how you like to spend your free time.

&nbsp;

## TL;DR

Blinking lights are pretty!

http://youtu.be/cTtNA68Kst0

## Skill Level

This project is very easy to assemble.&nbsp; Depending on what wire you use, you may not even need a soldering iron.&nbsp; In fact, the most important part is measuring carefully so everything looks straight -- more on that later!

- [Next Page](https://learn.adafruit.com/led-lightbox/parts-list.md)

## Featured Products

### Adafruit METRO 328 Fully Assembled - Arduino IDE compatible

[Adafruit METRO 328 Fully Assembled - Arduino IDE compatible](https://www.adafruit.com/product/50)
We sure love the ATmega328 here at Adafruit, and we use them&nbsp;_a lot_&nbsp;for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/50)
[Related Guides to the Product](https://learn.adafruit.com/products/50/guides)
### 12mm  Diffused Flat Digital RGB LED Pixels (Strand of 25)

[12mm  Diffused Flat Digital RGB LED Pixels (Strand of 25)](https://www.adafruit.com/product/738)
RGB Pixels are digitally-controllable lights you can set to any color, or animate. Each RGB LED and controller chip is molded into a 'dot' of silicone. The dots are weatherproof and rugged. There are four flanges molded in so that you can 'push' them into a 12mm drill hole in...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/738)
[Related Guides to the Product](https://learn.adafruit.com/products/738/guides)
### 5V 2A (2000mA) switching power supply - UL Listed

[5V 2A (2000mA) switching power supply - UL Listed](https://www.adafruit.com/product/276)
This is an FCC/CE certified and UL listed power supply. Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to 2000mA. 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one...

In Stock
[Buy Now](https://www.adafruit.com/product/276)
[Related Guides to the Product](https://learn.adafruit.com/products/276/guides)

## Related Guides

- [How to Choose a Microcontroller](https://learn.adafruit.com/how-to-choose-a-microcontroller.md)
- [Cloud Thermometer](https://learn.adafruit.com/cloud-thermometer.md)
- [Skill Badge Requirements: Microcontrollers](https://learn.adafruit.com/skill-badge-requirements-microcontrollers.md)
- [Metal Inlay Capacitive Touch Buttons](https://learn.adafruit.com/metal-inlay-capacitive-touch-buttons.md)
- [LSM303 Accelerometer + Compass Breakout](https://learn.adafruit.com/lsm303-accelerometer-slash-compass-breakout.md)
- [Adafruit Arduino Selection Guide](https://learn.adafruit.com/adafruit-arduino-selection-guide.md)
- [Arduino Lesson 4. Eight LEDs and a Shift Register](https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds.md)
- [WiFi Controlled LED Christmahanukwanzaa Tree](https://learn.adafruit.com/wifi-controlled-led-christmahanukwanzaa-tree.md)
- [How to Find Hidden COM Ports](https://learn.adafruit.com/how-to-find-hidden-com-ports.md)
- [Arduino GPS Clock](https://learn.adafruit.com/arduino-clock.md)
- [Adafruit 16-channel PWM/Servo Shield](https://learn.adafruit.com/adafruit-16-channel-pwm-slash-servo-shield.md)
- [Arduino Lesson 5. The Serial Monitor](https://learn.adafruit.com/adafruit-arduino-lesson-5-the-serial-monitor.md)
- [Arduino Lesson 1. Blink](https://learn.adafruit.com/adafruit-arduino-lesson-1-blink.md)
- [SMS Texting Pet Food Dish](https://learn.adafruit.com/sms-texting-pet-food-dish.md)
- [20mm LED Pixels](https://learn.adafruit.com/20mm-led-pixels.md)
