Addressable LED Grid

As prep for future projects, I’ve built a simple 2D array of individually addressable LEDs. This canvas will ultimately serve as the platform for some games (snake, pong, etc), but I’m hopeful that other people will find this useful and come up with some cool applications.

The Hardware
I previously wrote about different types of LED strips. For this project, I went with the cheaper (HL1606-based) strip, because I am probably going to use up a lot of the ribbon, and it’s significantly cheaper. The downside to using this over the more expensive strip is that I’ll have fewer colors, but I think that’ll be ok for the projects I have in mind. To make the array, I cut an LED strip into 8-LED segments, and then wired those segments serially. Electrically this means there was no change, but it allowed me to lay the strips side-by-side, to form an 8 LED by 8 LED canvas, where each LED is individually controllable by a microcontroller.

The Protocol (Low Level)
Because the strips alternatively go up and down, I am able to use adafruit’s HL1606strip library. The only difference is that every other segment gets written backwards, since it is oriented in the opposite direction.

The Library
I’ve introduced an additional layer of abstraction for this platform: HL1606grid (requires the external library HL1606strip). The API is (hopefully) straightforward. Once you instantiate the grid, you set a particular LED like: grid.setLEDcolor(row, col, RED);. If you’re familiar with the 1D HL1606strip library, that should look familiar.

The library comes with an example project, which you can see running above.

Get The Code
The code is open source, on github. If you make something cool, please let me know. Bug reports & pull requests encouraged!

Published by

Patrick Schless

I'm a (mostly) ruby/rails developer, living in Chicago. I work at Braintree, and I have lots of side-projects.

15 thoughts on “Addressable LED Grid”

  1. Nice project! If you plan to interface to a PC and maybe combine multiple different grids, you might want to follow …

  2. That’s very cool, I definately made to make a grid with the 1606s I have. They are just collecting space right now, do you think you could program this grid to display scrolling text like from an RSS feed using processing or something off a computer?

  3. So is it possible to program these addressable strips to display not just a specific series of colors but the exact timing of the display of colors, creating a “routine”? For example, timing the display to music? For a really long strip, say 100 meters, are there limitations on either electrical power or the ability of the available software to program that many LEDs?

  4. Cool — Similar to my LED t-shirt project, which is now a 10×10 array I hang inside a plain white t-shirt.
    I ran the power wires along one edge, instead of looping them along side the others – mostly because I had 4 wire ribbon for the top. …

    Biggest downside is the connections are fragile. Shirt/grid needs fixes after every wearing.
    I’ll look into your source soon.

  5. dadash sharmande kardi dari koamakm mikonia.bebakhshid. bashe ina ro montaghel mikonam.vali mikham bedonam chera vase nasbe patch azam masir nemikhad? bad shoma file be name kitserver mishnasi? man nadaramesh.

  6. I must say you have very interesting content here.
    Your posts should go viral. You need initial traffic only.
    How to get massive traffic? Search for: Murgrabia’s tools go viral

Leave a Reply

Your email address will not be published. Required fields are marked *