배송 |
---|
상품 정보 | 가격 | 삭제 |
---|---|---|
아두이노 8x8 도트 매트릭스 LED 5핀제어 MAX7219 모듈 | ||
TOTAL PRICE(수량) 0 |
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
40
41
42
43
44 |
#include "LedControl.h"
LedControl lc = LedControl(12, 11, 10, 1);
byte heart[] =
{
B01100110,
B11111111,
B11111111,
B11111111,
B01111110,
B00111100,
B00011000,
B00000000
};
void setup() {
lc.shutdown(0, false);
lc.setIntensity(0, 5);
lc.clearDisplay(0);
}
void loop() {
display_heart(1);
delay(500);
display_heart(0);
delay(500);
}
void display_heart(int a)
{
if (a == 0) {
for (int i = 0; i < 8; i++)
{
lc.setRow(0, i, heart[i]);
}
} else {
for (int i = 0; i < 8; i++)
{
lc.setRow(0, i, B00000000);
}
}
}
|
cs |
1,500원