Project Home

Code Longhorn

Project LightCraft

Connecting the Lights

Now that you have learned to connect your Arduino board and you have an example program running, let's begin working with the lights.


We're going to begin with the hardware, which is any physical component of the system. (Can you touch it? It is hardware!) In this project, your main pieces of hardware are the lights, Arduino board, breadboard, and computer, but there are smaller pieces, too, such as the USB cable and wires.

First, let's take a look at your lights. You'll find your lights in your bin. Take out the lights, and you'll find that you have 7 strands of 7 lights each.

These lights are individually addressable, which means that you can control the color and brightness of each light individually. The color and brightness are set by program commands, and a sequence of program commands can make the lights display a pattern, a message, or whatever the programmer chooses.

Looking at the lights again, you'll notice that there are three colors of wire running between the lights. Each of these wires is serving a purpose: the data wire (white) carries data (or the programmer's instructions) to the lights, the red wire carries power, and the blue wire carries ground.

We've modified the lights for the projects, and the data wire has been extended using a blue wire, the power wire has been extended with red wire, and the ground wire has been extended with black wire. We've actually extended the lights using various sizes of wires, so that they may reach the Arduino board more easily. In your initial setup, you'll want to set the lights up in a grid so that the ends of the light strand with the wires are all together at the top of the grid, and the two outside light strands have 9-inch wires, the second-most outside light strands have 7-inch wires, the two on either side of the center strand have 5-inch wires, and the center strand has 4-inch wires. We have marked the length of the wires on the bulb closest to them. Your setup should look something like this:

Task 2: Lights Connected Correctly

Next, let's take another look at the Arduino board. As you look at it, notice the numbered black components:

Each of the holes is a pin. Pins are where we will connect the Arduino board to external components. Find the pins labeled 1 to 7. We will use these pins to send our instructions from the board to the lights. We will connect the lights' data wires to these pins using a header.

Begin by locating the header in your bin:

Once you have found the header, connect the data wire from the leftmost strand to the leftmost position of the header, then the data wire from the strand second to the left to the second to the left on the header, etc. When you are finished, your header should be connected to the data wires like this:

Zooming out a little, your light set should look like this:

For now, we won't connect the header to the Arduino board so that we can have a little more room to work with the rest of the wires. We also recommend that you disconnect the USB cable for now.

Now let's connect the power and ground wires to the breadboard. For each light strand, connect the free end of the black ground wire to a pin in the row labeled - (the negative sign) and indicated by a blue line---that row is used for grounding the hardware.

Next, for each light strand, connect the free end of the red power wire to a pin in the row labeled + (the positive sign) and indicated by a red line. That row is used to provide power to the hardware.

When the lights' power and ground wires are connected, your setup should look like this:

Almost there! Only two more steps. First, we need to ground the Arduino. Locate the short jumper wire in your bin---it should be the only wire in your bin not yet connected to anything. Plug one end of the wire to a pin labeled GND (for ground) on the Arduino. The other end of this wire should be connected to the breadboard through a pin in the row labeled with - and indicated by a blue line. The wire should be connected like this (in this picture, the other wires have been removed for clarity, but you should not remove them!):

With all the wires connected, your setup should now look like this:

At this point, go ahead and connect the header to the Arduino board. Line it up so that the position containing the data wire from the leftmost strand is over pin 7 and the last (empty) position is over pin 0, and plug it in.

Your last step is to connect the power. Locate the power connector in your box. It looks like this:

You'll notice that one of the terminals is marked with a + for power, and one is marked with a - for ground. Connect the wire from the + terminal to the + row on the breadboard. Connect the wire from the - terminal to the - row on the breadboard. Once connected, your setup should appear like this:

Zooming in on the wires a little, they should look like this:

Now plug in the lights. To do this, plug the lights into the power adaptor in your box, and then plug the power adaptor into one of the plugs behind the monitor on your desk. If you have trouble accessing the plug, try using the power strip in your box and then plugging the power adaptor into it. Also, re-connect the USB cable as you did before.

When the lights and Arduino board are fully connected, they should look like this:

Zooming out, the whole set should look like this:

Once you believe you have them set correctly turn your cups to red so that a member of the camp staff can check your setup, and switch drivers.

Next, we'll learn to control the lights.