Generate led matrix model and send it to the led matrix module through the USB.
The connection between the led matrix module and the Arduino UNO:
Led matrix ▶ Arduino UNO
CLK (green) ▶ D10
CS (yellow) ▶ D11
DIN (orange) ▶ D12
GND (black) ▶ GND
VCC (red) ▶ 5V
To send the led matrix model to the led matrix module, we must have 3 things:
- Arduino sketch file
- Arduino led matrix library
- Led matrix generator
First, we must import the led matrix library to the Arduino IDE: Sketch->Import Library->Add Library
. Then open and upload the Arduino sketch file (led_matrix_serial.ino) to your Arduino UNO.
With the led matrix MAX2719 program (Led_matrix.exe), you can do 2 things:
- Send through the USB the current led model
- Generate raw byte array from led model and paste it into Arduino sketch file
If the Arduino sketch file (led_matrix_serial.ino) is open and uploaded to the Arduino UNO, select the serial port attached to your Arduino and click Send
. You will see the current led matrix model applied to the led matrix module.
If you don't want to set the led matrix module through the USB, open the Arduino sketch file (led_matrix.ino) to your Arduino UNO. Then, click on Copy to clipboard
and paste the led matrix model "byte array string" to your Arduino sketch like the following:
byte leds[8] = {<copied byte array string>};
byte leds[8] = {0x00,0x18,0x24,0x42,0x42,0x24,0x18,0x00};
We can see that that we can easily change the led state with the led matrix model.
An Arduino library for MAX7219 and MAX7221 Led display drivers
Arduino 8×8 LED Matrix Tutorial
Arduino tutorial: LED Matrix red 8x8 64 Led driven by MAX7219 (or MAX7221) and Arduino Uno
Android Things Port of the Arduino LedControl library for the MAX7219 LED matrix module