# How to Make an Individually Addressable LED Matrix Sign

67,464

59

14

## Introduction: How to Make an Individually Addressable LED Matrix Sign

A few days ago, Adafruit posted a blog about their new NeoMatrix library.
They don't have any tutorials up, but linked to their github for anyone who just can't wait can go ahead and have a hack at it. So last night I pulled their code, soldered together some 60-LED density individually addressable strips that I had lying around, and had a working LED matrix in no time.

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Solder Together Some LED Strips Into a Matrix

When you download the code from github, you'll see a folder called "examples". Make sure the "examples" folder is in your "Arduino" folder, and is next to the "libraries" folder--NOT inside of "libraries"! If your folders are not in the right place, it will not work.

and put all of these folders inside of your "libraries" folder. Check the image of my folder structure to make sure yours is similar.

Now it's time to set up your LEDs. The NeoMatrix library gives you several options
for setting up your LED matrix. As you solder your LED strips together, make sure to keep in mind that you'll have to match up the physical configuration of your LEDs and adruino with what you've configured in your code.

Open "examples", and find "matrixtest". Open this file in your arduino IDE.

Near the top of the file, you'll find the line of code that is used to define your matrix object. Here's what mine looks like:
NEO_MATRIX_TOP + NEO_MATRIX_LEFT +
NEO_MATRIX_ROWS + NEO_MATRIX_ZIGZAG,
NEO_RGB + NEO_KHZ800);

Here's what that code means:
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix( = "build me a new matrix"
5 = "that is 5 pixels wide"
7 = "and 7 LED strips tall."
3 = "I will plug my blue data wire from my LED strips into pin 3 on my arduino."
NEO_MATRIX_TOP + NEO_MATRIX_LEFT = "The beginning of my strip, nearest the arduino, is at the top left corner of my matrix."
NEO_MATRIX_ROWS = "I'm orienting my strips horizontally, not vertically."
NEO_MATRIX_ZIGZAG = "I'm soldering my strips in a zigzag pattern, not a progressive pattern."
NEO_RGB = "My strips have RGB LEDs, not GRB LEDs."
NEO_KHZ800 = "My strips work at 800KHz." (These last two will be on the data sheet for the LED strips you bought.)
);

Take a look at the picture of my LEDs, and note:

• I have 5 LEDs per strip on 7 strips
• My arduino is in the top left corner of the matrix
• My blue data wire is soldered to pin 3 on my arduino
• My LED strips are horizontal
• I soldered them together in a "zigzag" pattern, meaning every other strip is upside-down (more on this next)

## Step 2: Zigzag Vs. Progressive. What Does This Mean?

From our matrix object we just built, we were given many options. Luckily, most of them were very straight-forward. The step to choose "zigzag" or "progressive" may not have been so clear. Here's the difference:

A "progressive" arrangement of LEDs is soldered continuously. You snip the LED strip in two pieces, and solder wires directly between the two pieces. If you want to turn these into a matrix, you'll need to twist the second piece of strip around, so the wires will end up behind the LEDs. See the pictures for examples.

## Step 3: ZigZag

I like to use zigzag in many cases. The LEDs lie flat, which is nice.

Zigzag is done by cutting your LED strip into pieces, turning every other strip upside down, and soldering them together on the sides. See the pictures for examples.

## Step 4: Attaching to the Arduino

Now that you have your LEDs soldered together, you need to attach them to an arduino if you haven't already.

Remember, if you specified "3" in your matrix object in your code, you will need to attach your LED strip to pin 3 on your arduino.

Most LED strips have 4 wires: 2 black ground wires, 1 red power, and 1 blue data/signal wire. We only need 1 black, 1 red, and 1 blue in this case. (There are two black wires for other cases when your power and signal are not coming from the same location. In that case, you'd need to pair a black wire with the red wire, and the other black wire with the blue wire.)

Attach one black wire to GND, the red wire to 5V, and the blue wire to pin 3. I'm using an arduino micro in the picture. An Uno, Leonardo, etc should work similarly.

## Step 5: Test It Out!

In your matrixtest file, find this line:

matrix.print(F("Howdy"));

and change "Howdy" to whatever you want. Power up your arduino (I'm powering mine via usb in the picture) and give it a try!

Note: If you try a word longer than "Howdy", your word will be cut off. I'll leave it to you to read through the sample code and figure out how to fix that yourself! ;)

213
87 11K
125 9.7K

## 14 Discussions

Hi there,
can you tell me if it is better to connect the led's in rows or columns for a long single 10x72?
also do you know of a easy way to change the message displayed by fitting a set of push button switches to some of the other pins on the arduino?
What I want is a sign I can put in my back window of my car and connect it to a set of push button switches so by pushing a button the display would show a different message or icon whilst I am quite good at making and wiring up circuits my programming is very poor and I doubt I could modify this program to do what I wanted.
regards Poppy Ann.

Hi Poppy,

The choice of rows vs columns depends on how you want your strips physically oriented. If you want something that is long hortizonally but short vertically, rows is probably a good choice. If you want something that is tall vertically but not very wide, columns is probably a better choice. For me, I usually use these LED matrices to build banners (similar to what you're doing), so I use rows.

If you're interested in building this car banner, you might want to check this out: https://hackaday.com/2011/10/20/rear-window-led-di...

However, I will note that I had a similar idea to this several years back and ended up scrapping my project because I looked up the local laws in my area and light-up banners in cars are not legal where I live.

Hi again, I took a look at that site but none of the links would work not sure if it was due to age or my being here in uk, after reading some of the comments it sounds like I may not be able to due to the law may be I should just make one that shows smiley icons which there are many of now a days but even if I cannot have one in the back of the car I could put it in the front window of the house and just use it for Christmas/ Halloween etc.
Thanks for your reply regards Poppy Ann.

Great work, thank you. It has been a great help, I've just finished 30 x 10 pixel matrix.
I even worked out your puzzle :-)

Never mind srrsrssrrs. I just solved it. Thanks any way

Please share the solution with us. I wasn't able to solve that.

good day sir! can i ask how to control led strip in a form of 7 segment display. like i want to of first 3 leds, then on the next 3 leds, then on/off next 3 leds to form a 7 segment display. please help me sir. i am poor at programming. big thanks!

hy, is there anyway possible to controle this matrix with leap motion?

u can use vs2015 community to write c/basic code to get input from leapmotion

and send info to arduino (over serial) and then make matrix control program that controls leds hope it help mail me to matic.babnik1@gmail.com and i can give u the codes for serial in vs2015 and arduino

I have been looking for a tutorial on this everywhere. Thank you so much.

Thank you SO MUCH, I've been experimenting a ton with neopixel strips lately and have a project that uses the same "zig-zag" method you describe here, figuring I should be able to achieve the same results as any other matrix my search for tutorials brought me here. I'm going to try this out first chance I get! Here's a video and picture of the project I'm working on now: http://youtu.be/HOqiL093FvY