1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Hello Matrix
// by Nicholas Zambetti <http://www.zambetti.com>
// Demonstrates the use of the Matrix library
// For MAX7219 LED Matrix Controllers
// Blinks welcoming face on screen
// Created 13 February 2006
/* create a new Matrix instance
pin 0: data (din)
pin 1: load (load)
pin 2: clock (clk)
*/
Matrix myMatrix = Matrix(0, 2, 1);
void setup()
{
}
void loop()
{
myMatrix.clear(); // clear display
delay(1000);
// turn some pixels on
myMatrix.write(1, 5, HIGH);
myMatrix.write(2, 2, HIGH);
myMatrix.write(2, 6, HIGH);
myMatrix.write(3, 6, HIGH);
myMatrix.write(4, 6, HIGH);
myMatrix.write(5, 2, HIGH);
myMatrix.write(5, 6, HIGH);
myMatrix.write(6, 5, HIGH);
delay(1000);
}
|