-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtalk.ino
51 lines (37 loc) · 1.05 KB
/
talk.ino
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
45
46
47
48
49
50
51
#include <LedControl.h>
int DIN = 10;
int CS = 9;
int CLK = 8;
LedControl lc=LedControl(DIN,CLK,CS,0);
void setup(){
lc.shutdown(0,false);
lc.setIntensity(0,15);
lc.clearDisplay(0);
}
void loop(){
//Facial Expression
//byte smile[8]= {0x3C,0x42,0xA5,0x81,0xA5,0x99,0x42,0x3C};
byte smile[8]= {0x3c,0x42,0x95,0xa1,0xa1,0x95,0x42,0x3c};
//byte neutral[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x81,0x42,0x3C};
//byte happy[8]= {0x3C,0x42,0xA5,0x81,0xBD,0x99,0x42,0x3C};
byte happy[8]= {0x3c,0x42,0x95,0xb1,0xb1,0x95,0x42,0x3c};
//byte sad[8]= {0x3C,0x42,0xA5,0x81,0x99,0xA5,0x42,0x3C};
//Arrow
//byte arrow_up[8]= {0x18,0x3C,0x7E,0xFF,0x18,0x18,0x18,0x18};
//byte arrow_down[8]= {0x18,0x18,0x18,0x18,0xFF,0x7E,0x3C,0x18};
//Facial Expression
printByte(smile);
delay(500);
//printByte(neutral);
//delay(500);
printByte(happy);
delay(500);
}
void printByte(byte character [])
{
int i = 0;
for(i=0;i<8;i++)
{
lc.setRow(0,i,character[i]);
}
}