1#include <LedControl.h>
2
3int DIN = 10;
4int CS = 9;
5int CLK = 8;
6
7
8byte Design1[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
9byte Design2[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,};
10byte Design3[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,};
11byte Design4[8]= {0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,};
12byte Design5[8]= {0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,};
13byte Design6[8]= {0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,};
14byte Design7[8]= {0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,};
15byte Design8[8]= {0x00,0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F,};
16byte Design9[8]= {0x01,0x03,0x07,0x0F,0x1F,0x3F,0x7F,0xFF,};
17byte Design10[8]= {0x03,0x07,0x0F,0x1F,0x3F,0x7F,0xFF,0xFF,};
18byte Design11[8]= {0x07,0x0F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,};
19byte Design12[8]= {0x0F,0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,};
20byte Design13[8]= {0x1F,0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,};
21byte Design14[8]= {0x3F,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};
22byte Design15[8]= {0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};
23byte Design16[8]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};
24byte Design17[8]= {0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};
25byte Design18[8]= {0xAF,0x5F,0xBF,0x7F,0xFF,0xFF,0xFF,0xFF,};
26byte Design19[8]= {0xAB,0x57,0xAF,0x5F,0xBF,0x7F,0xFF,0xFF,};
27byte Design20[8]= {0xAA,0x55,0xAB,0x57,0xAF,0x5F,0xBF,0x7F,};
28byte Design21[8]= {0xAA,0x55,0xAA,0x55,0xAB,0x57,0xAF,0x5F,};
29byte Design22[8]= {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAB,0x57,};
30byte Design23[8]= {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,};
31
32
33
34byte BlinkOn1[8]= {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,};
35byte BlinkOff1[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
36byte BlinkOn2[8]= {0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,};
37byte BlinkOff2[8]= {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};
38
39
40
41
42LedControl lc=LedControl(DIN,CLK,CS,0);
43
44void setup(){
45 lc.shutdown(0,false);
46 lc.setIntensity(0,15);
47 lc.clearDisplay(0);
48}
49
50void loop(){
51
52
53
54 printByte(Design1);
55
56 delay(100);
57
58printByte(Design2);
59
60 delay(100);
61
62printByte(Design3);
63
64 delay(100);
65
66printByte(Design4);
67
68 delay(100);
69
70printByte(Design5);
71
72 delay(100);
73
74printByte(Design6);
75
76 delay(100);
77
78printByte(Design7);
79
80 delay(100);
81
82printByte(Design8);
83
84 delay(100);
85
86printByte(Design9);
87
88 delay(100);
89
90printByte(Design10);
91
92 delay(100);
93
94printByte(Design11);
95
96 delay(100);
97
98printByte(Design12);
99
100 delay(100);
101
102printByte(Design13);
103
104 delay(100);
105
106printByte(Design14);
107
108 delay(100);
109
110printByte(Design15);
111
112 delay(100);
113
114printByte(Design16);
115
116 delay(100);
117
118
119
120
121
122printByte(BlinkOn1);
123
124delay(750);
125
126printByte(BlinkOff1);
127
128delay(750);
129
130printByte(BlinkOn1);
131
132delay(750);
133
134printByte(BlinkOff1);
135
136delay(750);
137
138printByte(BlinkOn1);
139
140delay(750);
141
142
143
144printByte(Design17);
145
146delay(100);
147
148printByte(Design18);
149
150delay(100);
151
152printByte(Design19);
153
154delay(100);
155
156printByte(Design20);
157
158delay(100);
159
160printByte(Design21);
161
162delay(100);
163
164printByte(Design22);
165
166delay(100);
167
168printByte(Design23);
169
170delay(100);
171
172
173
174printByte(BlinkOn2);
175
176delay(750);
177
178printByte(BlinkOff2);
179
180delay(750);
181
182printByte(BlinkOn2);
183
184delay(750);
185
186printByte(BlinkOff2);
187
188delay(750);
189
190
191}
192
193
194void printByte(byte character [])
195{
196 int i = 0;
197 for(i=0;i<8;i++)
198 {
199 lc.setRow(0,i,character[i]);
200 }
201}
202
Anonymous user
2 years ago
My problem Arduino:1.8.13 (Windows 10), Board:"Arduino Uno" 8x8matrix_led_ino:1:10: fatal error: LedControl.h: No such file or directory #include <LedControl.h> ^~~~~~~~~~~~~~ compilation terminated. exit status 1 LedControl.h: No such file or directory