muwerk mupplet Display Library
muwerk applets; mupplets: functional units that support specific hardware or reusable applications
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ustd::DisplayMatrixMAX72XX Class Reference

mupplet-display MAX7219/MAX7221 Led Matrix Display class More...

#include <display_matrix_max72xx.h>

Inheritance diagram for ustd::DisplayMatrixMAX72XX:
ustd::MuppletGfxDisplay ustd::MuppletDisplay

Public Member Functions

 DisplayMatrixMAX72XX (String name, uint8_t csPin, uint8_t hDisplays=1, uint8_t vDisplays=1, uint8_t rotation=0)
 
void begin (Scheduler *_pSched, bool initialState=false)
 
void addfont (const GFXfont *font, uint8_t baseLine)
 
void addfont (const GFXfont *font, const char *baseLineReference="A")
 
void setfont (uint8_t font)
 

Detailed Description

mupplet-display MAX7219/MAX7221 Led Matrix Display class

The DisplayMatrixMAX72XX mupplet allows to control a led matrix display based on multiple 8x8 led matrix modules driven by a MAX7219 or MAX7221 connected via SPI.

The mupplet acts as an intelligent display server supporting various commands and scenarios.

Sample mupplet Integration

#define __ESP__ 1 // Platform defines required, see ustd library doc, mainpage.
#include "scheduler.h"
#include "display_matrix_max72xx.h"
ustd::Scheduler sched;
ustd::DisplayMatrixMAX72XX matrix("matrix", D8, 12, 1, 1);
void setup() {
matrix.begin(&sched);
}
mupplet-display MAX7219/MAX7221 Led Matrix Display class
Definition: display_matrix_max72xx.h:41

More information: DisplayMatrixMAX72XX Application Notes

Constructor & Destructor Documentation

◆ DisplayMatrixMAX72XX()

ustd::DisplayMatrixMAX72XX::DisplayMatrixMAX72XX ( String  name,
uint8_t  csPin,
uint8_t  hDisplays = 1,
uint8_t  vDisplays = 1,
uint8_t  rotation = 0 
)
inline

Instantiates a DisplayMatrixMAX72XX mupplet

No hardware interaction is performed, until begin() is called.

Parameters
nameName of the display, used to reference it by pub/sub messages
csPinThe chip select pin.
hDisplaysHorizontal number of 8x8 display units. (default: 1)
vDisplaysVertical number of 8x8 display units. (default: 1)
rotationDefine if and how the displays are rotated. The first display is the one closest to the Connections. rotation can be a numeric value from 0 to 3 representing respectively no rotation, 90 degrees clockwise, 180 degrees and 90 degrees counter clockwise.

Member Function Documentation

◆ addfont() [1/2]

void ustd::MuppletGfxDisplay::addfont ( const GFXfont *  font,
const char *  baseLineReference = "A" 
)
inlineinherited

Adds an Adafruit GFX font to the display mupplet

Parameters
fontThe Adafruit GFXfont object
baseLineReferenceThe reference char used to determine the baseline value of the selected font

◆ addfont() [2/2]

void ustd::MuppletGfxDisplay::addfont ( const GFXfont *  font,
uint8_t  baseLine 
)
inlineinherited

Adds an Adafruit GFX font to the display mupplet

Parameters
fontThe Adafruit GFXfont object
baseLineThe baseline value of the selected font

◆ begin()

void ustd::DisplayMatrixMAX72XX::begin ( Scheduler *  _pSched,
bool  initialState = false 
)
inline

Initialize the display hardware and start operation

Parameters
_pSchedPointer to a muwerk scheduler object, used to create worker tasks and for message pub/sub.
initialStateInitial logical state of the display: false=off, true=on.

◆ setfont()

void ustd::MuppletGfxDisplay::setfont ( uint8_t  font)
inlineinherited

Select the current font to use for output

Parameters
fontThe index number of the selected font. The built in font has the index number 0.

The documentation for this class was generated from the following file: