Libraries

Low and High Level Library

The library contains two types of objects, one called Adafruit_HT1632 and one called Adafruit_HT1632LEDMatrix. The former is a low level library, that is meant to talk to one controller chip at a time and directly to the locations in memory, and the latter is a full featured library object, that does proper LED location translation, and handles multiple panels.

The last point is an important one. You can "chain" HT1632's together so that they share data/write lines but you still have to figure out how to get text to split nicely across the seperate panels. We've taken care of that hard part for you with the library.

For example, if you want two panels in a row, simply add a second CS line at the end of the object creation.

Download: file
// use this line for single matrix
//Adafruit_HT1632LEDMatrix matrix = Adafruit_HT1632LEDMatrix(DATA, WR, CS);
// use this line for two matrices!
Adafruit_HT1632LEDMatrix matrix = Adafruit_HT1632LEDMatrix(DATA, WR, CS, CS2);

The Adafruit_HT1632LEDMatrix object will automatically think of itself as a 16x48 LED matrix instead of a 16x24 and when you draw text or shapes, they will be split properly.

Right now the library suppors up to 4 panels in a row

Chances are you will never want to use Adafruit_HT1632 objects directly, instead using Adafruit_HT1632LEDMatrix but we wanted to discuss why there are two.

This guide was first published on Jul 31, 2013. It was last updated on Jul 31, 2013. This page (Libraries) was last updated on Apr 17, 2019.