The Arduino LedControl library

LedControl is a library for the MAX7221 and MAX7219 Led display drivers. Only a few components are needed to control 64 Leds or a 7-segment display.


There are already lot code-examples for the Arduino and the MAX72XX Led display driver. Most of the projects have their focus on controlling individual Leds layed out in some sort of rectangular matrix. I needed the MAX72XX to drive a few 7-segment displays, so I went for a simple set of functions that display plain numbers and the (limited) set of alphanumeric characters that make sense visually. But the library also has the standard set of functions to control each Led individually.

Download and install

The latest version of the library is on the github project pages.

LedControl release page

Download the LedControl-<version>.zip-file tagged Latest release. This file contains the libary and a few example sketches. You don't need any of the Source code files which are also on the release page.

Install the library following the guidelines on the Arduino homepage:

Arduino Library install guide

Using the library in your project

The library documentation is devided into three parts

I recommend reading the Hardware section first and then go through the Library function documentation. and run a few of the example sketches that come with the library code. The FAQ collects some of the topics that where brought up by library users.

Known bugs

Currently none (tested with versions Arduino 1.0.x and Arduino 1.6.x)

Revision History

January 20, 2015
New release uses PROGMEM and saves 128 bytes of Ram
February 27, 2013
Moved code and documentation to Github
September 10, 2012
Changed the software license from LGPL to an MIT-style license.
September 19, 2011
Uploaded new version of Release 1.0 of the Arduino-IDE renamed the internal header file WProgramm.h to Arduino.h. The include statement in LedControl.h was updated so the library compiles under pre- and post-1.0 version of the IDE
October 14, 2008
Uploaded a new version of the The original version did not compile under arduino-0012.
December 5, 2007
Documentation and sourcecode is now hosted on the arduino playground
June 23, 2007
First public release


If you find an error or if you are looking for a special feature not yet covered in the existing code, please open a new issue on the github project page. If you don't have a github account (and don't want one) send your questions, objections or corrections to

License (The software)

The sourcecode for this library is released under the Terms of a MIT-style license