1.2" 8x8 Matrix

This version of the LED backpack is designed for the 1.2" 8x8 matrices. They measure only 1.2"x1.2" so its a shame to use a massive array of chips to control it. This backpack solves the annoyance of using 16 pins or a bunch of chips by having an I2C constant-current matrix controller sit neatly on the back of the PCB. The controller chip takes care of everything, drawing all 64 LEDs in the background. All you have to do is write data to it using the 2-pin I2C interface. There are two address select pins so you can select one of 8 addresses to control up to 8 of these on a single 2-pin I2C bus (as well as whatever other I2C chips or sensors you like). The driver chip can 'dim' the entire display from 1/16 brightness up to full brightness in 1/16th steps. It cannot dim individual LEDs, only the entire display at once.
These instruction apply to the 1.2" Matrix only! If you have a Bi-Color or 0.8" square matrix, follow the links on the left side of the page.
When you buy a pack from Adafruit, it comes with the fully tested and assembled backpack as well as a 8x8 matrix in one of the colors we provide (say, red, yellow or green). You'll need to solder the matrix onto the backpack but its an easy task.

First look for the line of text on the side of the LED matrix

Find the corner of the backpack with a filled in dot. Make sure that the text on the side of the matrix is on the same side as the filled dot

Slide the matrix into the backpack and flip it over. Triple check that the text is on the same side as the From Adafruit text
Solder in all 16 pins

Then clip the matrix leads short

Now you're ready to wire it up to a microcontroller. We'll assume you want to use a 4pin header. You can also of course solder wires directly. Place a 4-pin piece of header with the LONG pins down into the breadboard.
Place the soldered backpack on top of the header.

Solder the four pins

That's it! now you're ready to run the firmware!

Mini 8x8 Matrix Software

We wrote a basic library to help you work with the mini 8x8 matrix backpack. The library is written for the Arduino and will work with any Arduino as it just uses the I2C pins. The code is very portable and can be easily adapted to any I2C-capable micro.

Wiring to the matrix is really easy

  • Connect CLK to the I2C clock - on Arduino UNO thats Analog #5, on the Leonardo its Digital #3, on the Mega its digital #21
  • Connect DAT to the I2C data - on Arduino UNO thats Analog #4, on the Leonardo its Digital #2, on the Mega its digital #20
  • Connect GND to common ground
  • Connect VCC+ to power - 5V is best but 3V also seems to work for 3V microcontrollers.

Next, download the Adafruit LED Backpack library and the Adafruit GFX library from the Arduino library manager.

Open up the Arduino library manager:

Search for the Adafruit LED Backpack library and install it

Search for the Adafruit GFX library and install it

You should now be able to select the File->Examples->Adafruit_LEDBackpack->matrix88 example sketch. Upload it to your Arduino as usual. You should see a basic test program that goes through a bunch of different drawing routine

We also have a great tutorial on Arduino library installation at:

Once you're happy that the matrix works, you can write your own sketches. The 8x8 matrix supports everything the Adafruit GFX library - drawing pixels, lines, rectancles, circles, triangles, roundrects, and small bitmaps. For more details check out the GFX page which will detail all of the GFX routines.

All the drawing routines only change the display memory kept by the Arduino. Don't forget to call writeDisplay() after drawing to 'save' the memory out to the matrix via I2C.

There are also a few small routines that are special to the matrix:

  • setBrightness(brighness)- will let you change the overall brightness of the entire display. 0 is least bright, 15 is brightest and is what is initialized by the display when you start. You can call this function at any time to change the brightness of the -entire- display
  • blinkRate(rate) - You can blink the entire display. 0 is no blinking. 1, 2 or 3 is for display blinking.You can call this function at any time to change the blink rate of the -entire- display

The default orientation for graphics commands on this display places pixel (0,0) at the top-left when the header is at the left and Adafruit logo at the right. To use the matrix as shown above (header at top, logo at bottom), call matrix.setRotation(3) before issuing graphics commands.
This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012. This page (1.2" 8x8 Matrix) was last updated on Dec 12, 2019.