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.

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.

Next, download these libraries:

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:
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(5, 7, 3,

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)
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!
<p>hy, is there anyway possible to controle this matrix with leap motion?</p>
<p>u can use vs2015 community to write c/basic code to get input from leapmotion</p><p>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</p>
<p>good project.wheather we can use other leds and arduino uno</p>
<p>I have been looking for a tutorial on this everywhere. Thank you so much.</p>
<p>Thank you SO MUCH, I've been experimenting a ton with neopixel strips lately and have a project that uses the same &quot;zig-zag&quot; 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</p>
<p>Great! Congratulations!!</p><p>Can I do the same with common LEDs?</p>
<p>Is there anybody need individually addressable rgb led strips ? www.kingtarled.com</p>
Great work, thank you. It has been a great help, I've just finished 30 x 10 pixel matrix. <br>I even worked out your puzzle :-)
Awesome!!! Can't wait to try this out on my RGB LED strips!!!

About This Instructable




Bio: Software engineer & avid maker
More by solderface:Hamster Hack: Silencing  the Noisy Wheel - with Recycling! What to Bring to Burning Man LED Matrix Bike Safety Backpack 
Add instructable to: