![Handson Technology MAX7218 Скачать руководство пользователя страница 3](http://html1.mh-extra.com/html/handson-technology/max7218/max7218_user-manual_3555917003.webp)
3
www.handsontec.com
Connecting Table:
Arduino
MAX7219 Module
5V
VCC
GND
GND
D7
DIN
D5
CS
D6
CLK
Once we wire up the modules we are ready to take a look at the Arduino code of the first example. We will use the
MaxMatrix library which can be downloaded from
GitHub
.
Copy and paste the below sketch to Arduino IDE and upload to Arduino Uno board:
/*
8x8 LED Matrix MAX7219 Example 01
Based on the following library:
GitHub | riyas-org/max7219
https://github.com/riyas-org/max7219
*/
#include <MaxMatrix.h>
int
DIN
=
7
;
// DIN pin of MAX7219 module
int
CLK
=
6
;
// CLK pin of MAX7219 module
int
CS
=
5
;
// CS pin of MAX7219 module
int
maxInUse
=
1
;
MaxMatrix m
(
DIN
,
CS
,
CLK
,
maxInUse
);
char
A
[]
=
{
4
,
8
,
B01111110
,
B00010001
,
B00010001
,
B01111110
,
};
char
B
[]
=
{
4
,
8
,
B01111111
,
B01001001
,
B01001001
,
B00110110
,
};
char
smile01
[]
=
{
8
,
8
,
B00111100
,
B01000010
,
B10010101
,
B10100001
,
B10100001
,
B10010101
,
B01000010
,
B00111100
};
char
smile02
[]
=
{
8
,
8
,
B00111100
,
B01000010
,
B10010101
,
B10010001
,
B10010001
,
B10010101
,
B01000010
,