Infinity Rainbow

Introduction: Infinity Rainbow

Infinity mirrors are a fun illusion perfect for bright rainbows. This instructable shows you how to make a portable infinity rainbow you can take with you.


  • box or other enclosure
  • Mirror surface
  • tinting material
  • Neopixel strip
  • controller like Adafruit's CPX or gemma
  • compatible battery and wires

Please note that you need both a transparent mirror material and a full mirror surface. I used plastic mirror tiles and tinted window film

The box will need to have a flat surface you can cut out and cover with the tinting material. It will also need to be large enough to house the controller , battery, and extra wires.


Additional supplies include soldering and programming. Use the Arduino IDE to program the Circuit Playground Express (CPX) or gemma. Be sure to add the Adafruit libraries using the library manager.

Step 1: Prepare the Enclosure

Trace the encloser and cut portions of the mirror and tint materials. Make them just a little bit smaller so that they will be able to fit inside. Cut a portion out of the top of the container leaving just enough room to form a lip. The container I was using already had a plastic window so I did not need to cut out the lid here.

Because my enclosure was metal, I lined it with electrical tape. Make sure there is no bare metal that can short your circuits! I also used a strip of cardboard to attach the leds.

Step 2: Wire Your Circuits

The wiring is fairly simple. There are just 3 connections, but be sure that you are connecting to the beginning of the strip. The data connection should be made between A0 on the CPX and Din on the Neopixel strip. If you are using the Gemma, wire D1 to the strip's Din. Connect 5V line on the strip to the controller's Vout. This will give more power to the LEDs. Lastly, connect the ground between the controller and the led strip.

Step 3: Program the Rainbow

Arduino provides an easy way to program these RGB leds. If you don't already have the programming interface, download it from They have a getting started page to walk you through each step. After installing the Arduino IDE, you will use the built-in library manager to add support for Adafruit's NeoPixels and for your controller board.

Once you have set up the libraries, you will have access to NeoPixel example programs. Start with the buttoncycler example. It provides 3 rainbow routines to play with: rainbow, rainbowCycle, and theaterChaseRainbow. My favorite was rainbowCycle.

There are just 3 changes you will need to make to the example program

1) Set the number of NeoPixels with PIXEL_COUNT. For example if you have 16 LEDs, change the line of code to read:

#define PIXEL_COUNT 16

2) Set the controller's output pin. If you are using the CPX, make sure PIXEL_PIN is defined with the line

#define PIXEL_PIN 6

If you are using the Gemma, you will change this line to

#define PIXEL_PIN 1

3) Change the main code. In Arduino, the main routine is loop(). Find that routine and replace it with the following

void loop() {


Now plug it in and down load. You should see the results on the NeoPixels.

Step 4: Assemble

The first thing to assemble is putting the see-through tint on the top lid. Here it is shown attached with double sided tape.

Attach the NeoPixel strip as close to the lid as you can.

Next, place the battery and controller into the enclosure. If you are using the CPX, it will automatically turn on. If you are using the Gemma, you may need to switch it on. The LEDs will be lit at this step.

Above the circuitry, place the mirrored service. Try to secure it as close to the LEDs as you can.

The final step is to place the lid on. Now you have your portable infinity rainbow!

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest

Be the First to Share


    • Mason Jar Speed Challenge

      Mason Jar Speed Challenge
    • Bikes Challenge

      Bikes Challenge
    • Remix Contest

      Remix Contest