![]() |
MD_MAX72xx LED Matrix Arduino Library
2.4
Library to control connected MAX72XX devices as a pixel array
|
The library implements functions that allow the MAX72xx to be used for LED matrices (64 individual LEDs), allowing the programmer to use the LED matrix as a pixel device, displaying graphics elements much like any other pixel addressable display.
In this scenario, it is convenient to abstract out the concept of the hardware device and create a uniform and consistent pixel address space, with the libraries determining device and device-element address. Similarly, control of the devices should be uniform and abstracted to a system level.
The library still retains flexibility for device level control, should the developer require, through the use of overloaded class methods.
The library allows the run time code to be tailored through the use of compilation switches. The compile options start with USE_ and are documented in the section related to the main header file MD_MAX72xx.h.
NOTE: Compile switches must be edited in the library header file. Arduino header file 'mashing' during compilation makes the setting of these switches from user code completely unreliable.
One default font is defined as part of the library in PROGMEM memory. Alternative fonts can be specified to the library. The font builder tool provides a convenient way to develop alternative fonts.
The fonts are stored as a series of contiguous bytes in the following format:
To find a character in the font table, the library looks at the first byte (size), skips 'size'+1 bytes to the next character size byte and repeat until the last or target character is reached.
The compile-time switch USE_INDEX_FONT enables indexing of the font table for faster access, at the expense of increased RAM usage. If indexing is enabled, a single lookup is required to access the character data, rather than the sequential search described above.
The support for fonts (methods and data) may be completely disabled if not required through the compile-time switch USE_LOCAL_FONT. This will also disable user defined fonts.