Expand description

Provides utility functions on top of “max7219”-crate to display data (like text) on a MAX7219 powered matrix display.

Modules

Encoding utility functions that helps you to print symbols easily on a MAX7219-powered LED matrix.
Provides mappings for a mono spaced font I created myself. The font is not complete and many symbols are missing. This ist just an demonstration how it could be done.

Constants

We use 8x8 square matrices (per single display)
Maximum supported chained displays by MAX7219.

Functions

Convenient function that turns on the display, clears the display and sets the brightness to the highest possible value. It also sets the DecodeMode to NoDecode which is necessary for displaying content on the 8x8 matrix display. (Max7219 can also be used for 7 segment displays).
Iterates through the data and removes all gaps between symbols. A gap is two or more cols after each other that are all zero. This way, text looks more natural, as letters are closer together. Hence, we do not have a monospace font here. But (currently), also spaces are removed.
Set’s up the MAX7219-driver using “gpio_cdev”. This only works on Linux. It works for example on Raspberry. The communication uses SPI protocol. This does not require the “SPI Module” on Raspberry Pi to be activated. This works via regular GPIO pins.
Shift all row bits one to the left (to the next col). This way you can animate a moving text.
Shows a moving text in loop. After each iteration all bits are shifted one col to the left. Make sure to call prepare_display() first!
This does a transpose operation on the SingleDisplayData-Matrix and is a helper function for remove_gaps_in_display_text. Cols become rows and rows become cols. Example:

Type Definitions

The type of the driver.