CLK : 아두이노와 모듈이 동기화 하는 핀
DIN: 데이터를 주고 받는 핀
CS: 칩을 선택하는 핀
#include "LedControl.h" //
LedControl lc = LedControl(12, 10, 11, 1);
byte a[8] = {
B00000000,
B00100100,
B00100100,
B00000000,
B01111110,
B01111110,
B00111100,
B00000000
};
void setup() {
lc.shutdown(0, false);
lc.setIntensity(0, 8);
lc.clearDisplay(0);
}
void loop(){
for(int i = 0; i < 8; i++){
lc.setRow(0, i, a[i]);
}
delay(1000);
}
#include "LedControl.h"
LedControl lc=LedControl(12,10,11,1);
byte a[8]={
0b00000000,
0b00100100,
0b00100100,
0b00000000,
0b01111110,
0b01111110,
0b00111100,
0b00000000
};
byte b[8]={
0b00000000,
0b11100111,
0b01000010,
0b00000000,
0b00000000,
0b00111100,
0b01000010,
0b10000001
};
byte c[8]={
0b10000001,
0b01000010,
0b00100100,
0b00000000,
0b00111100,
0b01111110,
0b11111111,
0b00000000
};
void setup() {
lc.shutdown(0,false);
lc.setIntensity(0,8);
lc.clearDisplay(0);
}
void loop() {
for(int i=0;i<8;i++){
lc.setRow(0,i,a[i]);
}
delay(1000);
for(int i=0;i<8;i++){
lc.setRow(0,i,b[i]);
}
delay(1000);
for(int i=0;i<8;i++){
lc.setRow(0,i,c[i]);
}
delay(1000);
}