-
Notifications
You must be signed in to change notification settings - Fork 0
/
star.ino
126 lines (124 loc) · 2.58 KB
/
star.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 20, 4);
uint8_t a1[8] = {0x0,0x0,0x0,0x1f,0x8,0x4,0x2,0x1};
uint8_t a3[8] = {0x0,0x0,0x0,0x1f,0x2,0x4,0x8,0x10};
uint8_t a2[8] = {0x1,0x2,0x4,0x8,0x1f,0x0,0x0,0x0};
uint8_t a4[8] = {0x10,0x8,0x4,0x2,0x1f,0x0,0x0,0x0};
uint8_t b1[8] = {0x4,0xa,0x11,0x1f,0x0,0x0,0x0,0x0};
uint8_t b2[8] = {0x0,0x0,0x0,0x0,0x1f,0x11,0xa,0x4};
#if defined(ARDUINO) && ARDUINO >= 100
#define printByte(args) write(args);
#else
#define printByte(args) print(args,BYTE);
#endif
void setup() {
// put your setup code here, to run once:
lcd.init();
lcd.backlight();
lcd.begin(20,4);
lcd.createChar(0, a1);
lcd.createChar(1, a3);
lcd.createChar(2, a4);
lcd.createChar(3, a2);
lcd.createChar(4, b1);
lcd.createChar(5, b2);
lcd.setCursor(0,0);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(0,1);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(5,0);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(5,1);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(10,0);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(10,1);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(15,0);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(15,1);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(0,2);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(0,3);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(5,2);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(5,3);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(10,2);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(10,3);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
lcd.setCursor(15,2);
lcd.printByte(0);
lcd.printByte(1);
lcd.printByte(4);
lcd.printByte(0);
lcd.printByte(1);
lcd.setCursor(15,3);
lcd.printByte(3);
lcd.printByte(2);
lcd.printByte(5);
lcd.printByte(3);
lcd.printByte(2);
}
void loop() {
// put your main code here, to run repeatedly:
}