Robot expression ( ecran OLED ) : Différence entre versions
(→deuxieme partie du code arduino) |
(→montage electronique) |
||
Ligne 8 : | Ligne 8 : | ||
* 3 boutons poussoirs | * 3 boutons poussoirs | ||
− | === montage | + | === montage électronique === |
[[Fichier:Schema electronique ecran oled.png|400px]] | [[Fichier:Schema electronique ecran oled.png|400px]] | ||
+ | |||
+ | Voici une représentation du montage à faire, attention au sens des câbles. | ||
+ | 4 câbles | ||
+ | * GND c'est la masse | ||
+ | * VCC c'est l'alimentation 3,4V | ||
+ | * SCL A5 | ||
+ | * SDA A4 | ||
=== premiere partie du code arduino === | === premiere partie du code arduino === |
Version du 13 mai 2024 à 14:04
Sommaire
Robot expression ( ecran OLED )
pour animer un robot / un petit bot ou autre , je vous propose le tutoriel suivant qui permet grace à des boutons poussoirs de choisir l'expression des yeux du robot.
materiel
- arduino uno + cable usb
- cables dupont M-M
- ecan oled 128*64
- 3 boutons poussoirs
montage électronique
Voici une représentation du montage à faire, attention au sens des câbles. 4 câbles
- GND c'est la masse
- VCC c'est l'alimentation 3,4V
- SCL A5
- SDA A4
premiere partie du code arduino
attention , il faut rajouter un onglet au code avec la partie eyes.h
1 #include <Wire.h>
2 #include <Adafruit_GFX.h>
3 #include <Adafruit_SSD1306.h>
4
5 #define SCREEN_WIDTH 128 // OLED display width, in pixels
6 #define SCREEN_HEIGHT 64 // OLED display height, in pixels
7 // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
8 #define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
9 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
10
11 #include "eyes.h"
12
13 void setup() {
14 // put your setup code here, to run once:
15 pinMode(8,INPUT_PULLUP);
16 pinMode(9,INPUT_PULLUP);
17 pinMode(10,INPUT_PULLUP);
18 pinMode(11,INPUT_PULLUP);
19
20 Serial.begin(115200);
21 Serial.println("Booting");
22
23 if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3c)) { // Address 0x3D for 128x64
24 Serial.println(F("SSD1306 allocation failed"));
25 for(;;); // Don't proceed, loop forever
26 }
27
28 // Show initial display buffer contents on the screen --
29 // the library initializes this with an Adafruit splash screen.
30 display.display();
31
32 // Clear the buffer
33 display.clearDisplay();
34 display.display();
35 }
36
37 unsigned char readkey(void){
38 unsigned char ret=0;
39 if (digitalRead(8)==0 ) ret=1; //izquierda
40 if (digitalRead(9)==0) ret+=2; //arriba
41 if (digitalRead(10)==0) ret+=4; //abajo
42 if (digitalRead(11)==0) ret+=8; //fuego
43 return (ret);
44 }
45
46 int xp=16;
47 int mood=1;
48
49 void loop() {
50 int n;
51 static int xd=0;
52 static int espera=0;
53 static int step=0;
54 int x1,x2;
55 if (espera>0) {
56 espera--;
57 delay(1);
58 } else {
59 x1= xd+ (xp>16? (16+2*(xp-16)):xp);
60 x2=64+xd+ (xp<16? (-16+(xp*2)) :xp);
61 switch (step){
62 case 0:
63 display.clearDisplay(); // Clear the display buffer
64 if (xp<6) {
65 display.drawBitmap(x1, 8, peyes[mood][2][0], 32, 32, WHITE);
66 display.drawBitmap(x2, 8, peyes[mood][1][1], 32, 32, WHITE);
67 } else if (xp<26) {
68 display.drawBitmap(x1, 8, peyes[mood][0][0], 32, 32, WHITE);
69 display.drawBitmap(x2, 8, peyes[mood][0][1], 32, 32, WHITE);
70 } else {
71 display.drawBitmap(x1, 8, peyes[mood][1][0], 32, 32, WHITE);
72 display.drawBitmap(x2, 8, peyes[mood][2][1], 32, 32, WHITE);
73 }
74 display.display();
75 espera=random(250, 1000);
76 n=random(0,7);
77 if (n==6) {
78 step=1;
79 } else {
80 step=2;
81 }
82 break;
83 case 1:
84 display.clearDisplay(); // Clear the display buffer
85 display.drawBitmap(x1, 8, eye0, 32, 32, WHITE);
86 display.drawBitmap(x2, 8, eye0, 32, 32, WHITE);
87 display.display();
88 espera=100;
89 step=0;
90 break;
91 case 2:
92 n=random(0,10);
93 if (n<5) xd--;
94 if (n>5) xd++;
95 if (xd<-4) xd=-3;
96 if (xd>4) xd=3;
97 espera=0;
98 step=0;
99 break;
100 }
101 }
102 //n=0;
103 n=readkey();
104 if (n==2) xp=(xp<=0?0:xp-1);
105 if (n==4) xp=(xp>=32?32:xp+1);
106 if (n==1) {
107 mood=(mood>=5?0:mood+1);
108 do {} while (readkey()!=0);
109 }
110 if (n!=0) { espera=0; step=0; }
111
112 }
deuxieme partie du code arduino
1 static const unsigned char PROGMEM eye0[] =
2 {
3 B00000000,B00000000,B00000000,B00000000,
4 B00000000,B00000000,B00000000,B00000000,
5 B00000000,B00000000,B00000000,B00000000,
6 B00000000,B00000000,B00000000,B00000000,
7 B00000000,B00000000,B00000000,B00000000,
8 B00000000,B00000000,B00000000,B00000000,
9 B00000000,B00000000,B00000000,B00000000,
10 B00000000,B00000000,B00000000,B00000000,
11 B00000000,B00000000,B00000000,B00000000,
12 B00000000,B00000000,B00000000,B00000000,
13 B00000000,B00000000,B00000000,B00000000,
14 B00000000,B00000000,B00000000,B00000000,
15 B00000000,B00000000,B00000000,B00000000,
16 B00000000,B00000000,B00000000,B00000000,
17 B00000000,B00000000,B00000000,B00000000,
18 B00000000,B00000000,B00000000,B00000000,
19 B00000000,B00000000,B00000000,B00000000,
20 B11111111,B11111111,B11111111,B11111111,
21 B11111111,B11111111,B11111111,B11111111,
22 B11111111,B11111111,B11111111,B11111111,
23 B11111111,B11111111,B11111111,B11111111,
24 B00000000,B00000000,B00000000,B00000000,
25 B00000000,B00000000,B00000000,B00000000,
26 B00000000,B00000000,B00000000,B00000000,
27 B00000000,B00000000,B00000000,B00000000,
28 B00000000,B00000000,B00000000,B00000000,
29 B00000000,B00000000,B00000000,B00000000,
30 B00000000,B00000000,B00000000,B00000000,
31 B00000000,B00000000,B00000000,B00000000,
32 B00000000,B00000000,B00000000,B00000000,
33 B00000000,B00000000,B00000000,B00000000,
34 B00000000,B00000000,B00000000,B00000000,
35 };
36
37
38
39
40
41 static const unsigned char PROGMEM eye1[] =
42 {
43 B00000111,B11111111,B11111111,B11100000,
44 B00011111,B11111111,B11111111,B11111000,
45 B00111111,B11111111,B11111111,B11111100,
46 B01111111,B11111111,B11111111,B11111110,
47 B01111111,B11111111,B11111111,B11111110,
48 B11111111,B11111111,B11111111,B11111111,
49 B11111111,B11111111,B11111111,B11111111,
50 B11111111,B11111111,B11111111,B11111111,
51 B11111111,B11111111,B11111111,B11111111,
52 B11111111,B11111111,B11111111,B11111111,
53 B11111111,B11111111,B11111111,B11111111,
54 B11111111,B11111111,B11111111,B11111111,
55 B11111111,B11111111,B11111111,B11111111,
56 B11111111,B11111111,B11111111,B11111111,
57 B11111111,B11111111,B11111111,B11111111,
58 B11111111,B11111111,B11111111,B11111111,
59 B11111111,B11111111,B11111111,B11111111,
60 B11111111,B11111111,B11111111,B11111111,
61 B11111111,B11111111,B11111111,B11111111,
62 B11111111,B11111111,B11111111,B11111111,
63 B11111111,B11111111,B11111111,B11111111,
64 B11111111,B11111111,B11111111,B11111111,
65 B11111111,B11111111,B11111111,B11111111,
66 B11111111,B11111111,B11111111,B11111111,
67 B11111111,B11111111,B11111111,B11111111,
68 B11111111,B11111111,B11111111,B11111111,
69 B11111111,B11111111,B11111111,B11111111,
70 B01111111,B11111111,B11111111,B11111110,
71 B01111111,B11111111,B11111111,B11111110,
72 B00111111,B11111111,B11111111,B11111100,
73 B00011111,B11111111,B11111111,B11111000,
74 B00000111,B11111111,B11111111,B11100000,
75 };
76
77
78
79
80
81 static const unsigned char PROGMEM eye2[] =
82 {
83 B00000000,B00000000,B00000000,B00000000,
84 B00000000,B00000000,B00000000,B00000000,
85 B00000000,B00000000,B00000000,B00000000,
86 B00000000,B00000000,B00000000,B00000000,
87 B00000000,B01111111,B11111110,B00000000,
88 B00000001,B11111111,B11111111,B10000000,
89 B00000011,B11111111,B11111111,B11000000,
90 B00000111,B11111111,B11111111,B11100000,
91 B00000111,B11111111,B11111111,B11100000,
92 B00001111,B11111111,B11111111,B11110000,
93 B00001111,B11111111,B11111111,B11110000,
94 B00001111,B11111111,B11111111,B11110000,
95 B00001111,B11111111,B11111111,B11110000,
96 B00001111,B11111111,B11111111,B11110000,
97 B00001111,B11111111,B11111111,B11110000,
98 B00001111,B11111111,B11111111,B11110000,
99 B00001111,B11111111,B11111111,B11110000,
100 B00001111,B11111111,B11111111,B11110000,
101 B00001111,B11111111,B11111111,B11110000,
102 B00001111,B11111111,B11111111,B11110000,
103 B00001111,B11111111,B11111111,B11110000,
104 B00001111,B11111111,B11111111,B11110000,
105 B00001111,B11111111,B11111111,B11110000,
106 B00000111,B11111111,B11111111,B11100000,
107 B00000111,B11111111,B11111111,B11100000,
108 B00000011,B11111111,B11111111,B11000000,
109 B00000001,B11111111,B11111111,B10000000,
110 B00000000,B01111111,B11111110,B00000000,
111 B00000000,B00000000,B00000000,B00000000,
112 B00000000,B00000000,B00000000,B00000000,
113 B00000000,B00000000,B00000000,B00000000,
114 B00000000,B00000000,B00000000,B00000000,
115 };
116
117
118
119
120
121 static const unsigned char PROGMEM eye3[] =
122 {
123 B00000000,B01111111,B11111110,B00000000,
124 B00000001,B11111111,B11111111,B10000000,
125 B00000011,B11111111,B11111111,B11000000,
126 B00000111,B11111111,B11111111,B11100000,
127 B00000111,B11111111,B11111111,B11100000,
128 B00001111,B11111111,B11111111,B11110000,
129 B00001111,B11111111,B11111111,B11110000,
130 B00001111,B11111111,B11111111,B11110000,
131 B00001111,B11111111,B11111111,B11110000,
132 B00001111,B11111111,B11111111,B11110000,
133 B00001111,B11111111,B11111111,B11110000,
134 B00001111,B11111111,B11111111,B11110000,
135 B00001111,B11111111,B11111111,B11110000,
136 B00001111,B11111111,B11111111,B11110000,
137 B00001111,B11111111,B11111111,B11110000,
138 B00001111,B11111111,B11111111,B11110000,
139 B00001111,B11111111,B11111111,B11110000,
140 B00001111,B11111111,B11111111,B11110000,
141 B00001111,B11111111,B11111111,B11110000,
142 B00001111,B11111111,B11111111,B11110000,
143 B00001111,B11111111,B11111111,B11110000,
144 B00001111,B11111111,B11111111,B11110000,
145 B00001111,B11111111,B11111111,B11110000,
146 B00001111,B11111111,B11111111,B11110000,
147 B00001111,B11111111,B11111111,B11110000,
148 B00001111,B11111111,B11111111,B11110000,
149 B00001111,B11111111,B11111111,B11110000,
150 B00000111,B11111111,B11111111,B11100000,
151 B00000111,B11111111,B11111111,B11100000,
152 B00000011,B11111111,B11111111,B11000000,
153 B00000001,B11111111,B11111111,B10000000,
154 B00000000,B01111111,B11111110,B00000000,
155 };
156
157
158
159
160
161 static const unsigned char PROGMEM eye4[] =
162 {
163 B00000111,B11111111,B11111111,B11100000,
164 B00011111,B11111111,B11111111,B11111000,
165 B00111111,B11111111,B11111111,B11111100,
166 B01111111,B11111111,B11111111,B11111110,
167 B01111111,B11111111,B11111111,B11111110,
168 B11111111,B11111111,B11111111,B11111111,
169 B11111111,B11111111,B11111111,B11111111,
170 B11111000,B00000000,B00000000,B00011111,
171 B11100000,B00000000,B00000000,B00000111,
172 B11000000,B00000000,B00000000,B00000011,
173 B10000000,B00000000,B00000000,B00000001,
174 B10000000,B00000000,B00000000,B00000001,
175 B00000000,B00000000,B00000000,B00000000,
176 B00000000,B00000000,B00000000,B00000000,
177 B00000000,B00000000,B00000000,B00000000,
178 B00000000,B00000000,B00000000,B00000000,
179 B00000000,B00000000,B00000000,B00000000,
180 B00000000,B00000000,B00000000,B00000000,
181 B00000000,B00000000,B00000000,B00000000,
182 B00000000,B00000000,B00000000,B00000000,
183 B00000000,B00000000,B00000000,B00000000,
184 B00000000,B00000000,B00000000,B00000000,
185 B00000000,B00000000,B00000000,B00000000,
186 B00000000,B00000000,B00000000,B00000000,
187 B00000000,B00000000,B00000000,B00000000,
188 B00000000,B00000000,B00000000,B00000000,
189 B00000000,B00000000,B00000000,B00000000,
190 B00000000,B00000000,B00000000,B00000000,
191 B00000000,B00000000,B00000000,B00000000,
192 B00000000,B00000000,B00000000,B00000000,
193 B00000000,B00000000,B00000000,B00000000,
194 B00000000,B00000000,B00000000,B00000000,
195 };
196
197
198
199
200
201 static const unsigned char PROGMEM eye5[] =
202 {
203 B00000000,B00000000,B00000000,B00000000,
204 B00000000,B00000000,B00000000,B00000000,
205 B00000000,B00000000,B00000000,B00000000,
206 B00000000,B00000000,B00000000,B00000000,
207 B00000000,B01111111,B11111110,B00000000,
208 B00000001,B11111111,B11111111,B10000000,
209 B00000011,B11111111,B11111111,B11000000,
210 B00000111,B11111111,B11111111,B11100000,
211 B00000111,B11111111,B11111111,B11100000,
212 B00001111,B11111111,B11111111,B11110000,
213 B00001111,B10000000,B00000001,B11110000,
214 B00001110,B00000000,B00000000,B01110000,
215 B00001100,B00000000,B00000000,B00110000,
216 B00001000,B00000000,B00000000,B00010000,
217 B00000000,B00000000,B00000000,B00000000,
218 B00000000,B00000000,B00000000,B00000000,
219 B00000000,B00000000,B00000000,B00000000,
220 B00000000,B00000000,B00000000,B00000000,
221 B00000000,B00000000,B00000000,B00000000,
222 B00000000,B00000000,B00000000,B00000000,
223 B00000000,B00000000,B00000000,B00000000,
224 B00000000,B00000000,B00000000,B00000000,
225 B00000000,B00000000,B00000000,B00000000,
226 B00000000,B00000000,B00000000,B00000000,
227 B00000000,B00000000,B00000000,B00000000,
228 B00000000,B00000000,B00000000,B00000000,
229 B00000000,B00000000,B00000000,B00000000,
230 B00000000,B00000000,B00000000,B00000000,
231 B00000000,B00000000,B00000000,B00000000,
232 B00000000,B00000000,B00000000,B00000000,
233 B00000000,B00000000,B00000000,B00000000,
234 B00000000,B00000000,B00000000,B00000000,
235 };
236
237
238
239
240
241 static const unsigned char PROGMEM eye6[] =
242 {
243 B00000000,B01111111,B11111110,B00000000,
244 B00000001,B11111111,B11111111,B10000000,
245 B00000011,B11111111,B11111111,B11000000,
246 B00000111,B11111111,B11111111,B11100000,
247 B00000111,B11111111,B11111111,B11100000,
248 B00001111,B11111111,B11111111,B11110000,
249 B00001111,B10000000,B00000001,B11110000,
250 B00001110,B00000000,B00000000,B01110000,
251 B00001100,B00000000,B00000000,B00110000,
252 B00001000,B00000000,B00000000,B00010000,
253 B00000000,B00000000,B00000000,B00000000,
254 B00000000,B00000000,B00000000,B00000000,
255 B00000000,B00000000,B00000000,B00000000,
256 B00000000,B00000000,B00000000,B00000000,
257 B00000000,B00000000,B00000000,B00000000,
258 B00000000,B00000000,B00000000,B00000000,
259 B00000000,B00000000,B00000000,B00000000,
260 B00000000,B00000000,B00000000,B00000000,
261 B00000000,B00000000,B00000000,B00000000,
262 B00000000,B00000000,B00000000,B00000000,
263 B00000000,B00000000,B00000000,B00000000,
264 B00000000,B00000000,B00000000,B00000000,
265 B00000000,B00000000,B00000000,B00000000,
266 B00000000,B00000000,B00000000,B00000000,
267 B00000000,B00000000,B00000000,B00000000,
268 B00000000,B00000000,B00000000,B00000000,
269 B00000000,B00000000,B00000000,B00000000,
270 B00000000,B00000000,B00000000,B00000000,
271 B00000000,B00000000,B00000000,B00000000,
272 B00000000,B00000000,B00000000,B00000000,
273 B00000000,B00000000,B00000000,B00000000,
274 B00000000,B00000000,B00000000,B00000000,
275 };
276
277
278
279
280
281 static const unsigned char PROGMEM eye7[] =
282 {
283 B00000000,B00000000,B00000000,B00000000,
284 B00000000,B00000000,B00000000,B00000000,
285 B00000000,B00000000,B00000000,B00000000,
286 B00000000,B00000000,B00000000,B00000000,
287 B00000000,B00000000,B00000000,B00000000,
288 B00000000,B00000000,B00000000,B00000000,
289 B00000000,B00000000,B00000000,B00000000,
290 B00000000,B00000000,B00000000,B00000000,
291 B00000000,B00000000,B00000000,B00000000,
292 B00000000,B00000000,B00000000,B00000000,
293 B00000000,B00000000,B00000000,B00000000,
294 B00000000,B00000000,B00000000,B00000000,
295 B00000000,B00000000,B00000000,B00000000,
296 B00000000,B00000000,B00000000,B00000000,
297 B00000000,B00000000,B00000000,B00000000,
298 B00000000,B00000000,B00000000,B00000000,
299 B11111111,B11111111,B11111111,B11111111,
300 B11111111,B11111111,B11111111,B11111111,
301 B11111111,B11111111,B11111111,B11111111,
302 B11111111,B11111111,B11111111,B11111111,
303 B11111111,B11111111,B11111111,B11111111,
304 B11111111,B11111111,B11111111,B11111111,
305 B11111111,B11111111,B11111111,B11111111,
306 B11111111,B11111111,B11111111,B11111111,
307 B11111111,B11111111,B11111111,B11111111,
308 B11111111,B11111111,B11111111,B11111111,
309 B11111111,B11111111,B11111111,B11111111,
310 B01111111,B11111111,B11111111,B11111110,
311 B01111111,B11111111,B11111111,B11111110,
312 B00111111,B11111111,B11111111,B11111100,
313 B00011111,B11111111,B11111111,B11111000,
314 B00000111,B11111111,B11111111,B11100000,
315 };
316
317
318
319
320
321 static const unsigned char PROGMEM eye8[] =
322 {
323 B00000000,B00000000,B00000000,B00000000,
324 B00000000,B00000000,B00000000,B00000000,
325 B00000000,B00000000,B00000000,B00000000,
326 B00000000,B00000000,B00000000,B00000000,
327 B00000000,B00000000,B00000000,B00000000,
328 B00000000,B00000000,B00000000,B00000000,
329 B00000000,B00000000,B00000000,B00000000,
330 B00000000,B00000000,B00000000,B00000000,
331 B00000000,B00000000,B00000000,B00000000,
332 B00000000,B00000000,B00000000,B00000000,
333 B00000000,B00000000,B00000000,B00000000,
334 B00000000,B00000000,B00000000,B00000000,
335 B00000000,B00000000,B00000000,B00000000,
336 B00000000,B00000000,B00000000,B00000000,
337 B00000000,B00000000,B00000000,B00000000,
338 B00000000,B00000000,B00000000,B00000000,
339 B00001111,B11111111,B11111111,B11110000,
340 B00001111,B11111111,B11111111,B11110000,
341 B00001111,B11111111,B11111111,B11110000,
342 B00001111,B11111111,B11111111,B11110000,
343 B00001111,B11111111,B11111111,B11110000,
344 B00001111,B11111111,B11111111,B11110000,
345 B00001111,B11111111,B11111111,B11110000,
346 B00000111,B11111111,B11111111,B11100000,
347 B00000111,B11111111,B11111111,B11100000,
348 B00000011,B11111111,B11111111,B11000000,
349 B00000001,B11111111,B11111111,B10000000,
350 B00000000,B01111111,B11111110,B00000000,
351 B00000000,B00000000,B00000000,B00000000,
352 B00000000,B00000000,B00000000,B00000000,
353 B00000000,B00000000,B00000000,B00000000,
354 B00000000,B00000000,B00000000,B00000000,
355 };
356
357
358
359
360
361 static const unsigned char PROGMEM eye9[] =
362 {
363 B00000000,B00000000,B00000000,B00000000,
364 B00000000,B00000000,B00000000,B00000000,
365 B00000000,B00000000,B00000000,B00000000,
366 B00000000,B00000000,B00000000,B00000000,
367 B00000000,B00000000,B00000000,B00000000,
368 B00000000,B00000000,B00000000,B00000000,
369 B00000000,B00000000,B00000000,B00000000,
370 B00000000,B00000000,B00000000,B00000000,
371 B00000000,B00000000,B00000000,B00000000,
372 B00000000,B00000000,B00000000,B00000000,
373 B00000000,B00000000,B00000000,B00000000,
374 B00000000,B00000000,B00000000,B00000000,
375 B00000000,B00000000,B00000000,B00000000,
376 B00000000,B00000000,B00000000,B00000000,
377 B00000000,B00000000,B00000000,B00000000,
378 B00000000,B00000000,B00000000,B00000000,
379 B00001111,B11111111,B11111111,B11110000,
380 B00001111,B11111111,B11111111,B11110000,
381 B00001111,B11111111,B11111111,B11110000,
382 B00001111,B11111111,B11111111,B11110000,
383 B00001111,B11111111,B11111111,B11110000,
384 B00001111,B11111111,B11111111,B11110000,
385 B00001111,B11111111,B11111111,B11110000,
386 B00001111,B11111111,B11111111,B11110000,
387 B00001111,B11111111,B11111111,B11110000,
388 B00001111,B11111111,B11111111,B11110000,
389 B00001111,B11111111,B11111111,B11110000,
390 B00000111,B11111111,B11111111,B11100000,
391 B00000111,B11111111,B11111111,B11100000,
392 B00000011,B11111111,B11111111,B11000000,
393 B00000001,B11111111,B11111111,B10000000,
394 B00000000,B01111111,B11111110,B00000000,
395 };
396
397
398
399
400
401 static const unsigned char PROGMEM eye10i[] =
402 {
403 B00000000,B00000000,B00000000,B00000000,
404 B00000000,B00000000,B00000000,B00000000,
405 B00000000,B00000000,B00000000,B00000000,
406 B00000000,B00000000,B00000000,B00000000,
407 B00000000,B00000000,B00000000,B00000010,
408 B00000000,B00000000,B00000000,B00011111,
409 B00000000,B00000000,B00000000,B11111111,
410 B00000000,B00000000,B00000111,B11111111,
411 B00000000,B00000000,B00111111,B11111111,
412 B00000000,B00000001,B11111111,B11111111,
413 B00000000,B00001111,B11111111,B11111111,
414 B00000000,B01111111,B11111111,B11111111,
415 B00000011,B11111111,B11111111,B11111111,
416 B00011111,B11111111,B11111111,B11111111,
417 B11111111,B11111111,B11111111,B11111111,
418 B11111111,B11111111,B11111111,B11111111,
419 B11111111,B11111111,B11111111,B11111111,
420 B11111111,B11111111,B11111111,B11111111,
421 B11111111,B11111111,B11111111,B11111111,
422 B11111111,B11111111,B11111111,B11111111,
423 B11111111,B11111111,B11111111,B11111111,
424 B11111111,B11111111,B11111111,B11111111,
425 B11111111,B11111111,B11111111,B11111111,
426 B11111111,B11111111,B11111111,B11111111,
427 B11111111,B11111111,B11111111,B11111111,
428 B11111111,B11111111,B11111111,B11111111,
429 B11111111,B11111111,B11111111,B11111111,
430 B01111111,B11111111,B11111111,B11111110,
431 B01111111,B11111111,B11111111,B11111110,
432 B00111111,B11111111,B11111111,B11111100,
433 B00011111,B11111111,B11111111,B11111000,
434 B00000111,B11111111,B11111111,B11100000,
435 };
436
437
438
439
440
441 static const unsigned char PROGMEM eye10d[] =
442 {
443 B00000000,B00000000,B00000000,B00000000,
444 B00000000,B00000000,B00000000,B00000000,
445 B00000000,B00000000,B00000000,B00000000,
446 B00000000,B00000000,B00000000,B00000000,
447 B01000000,B00000000,B00000000,B00000000,
448 B11111000,B00000000,B00000000,B00000000,
449 B11111111,B00000000,B00000000,B00000000,
450 B11111111,B11100000,B00000000,B00000000,
451 B11111111,B11111100,B00000000,B00000000,
452 B11111111,B11111111,B10000000,B00000000,
453 B11111111,B11111111,B11110000,B00000000,
454 B11111111,B01111111,B11111110,B00000000,
455 B11111111,B11111111,B11111111,B11000000,
456 B11111111,B11111111,B11111111,B11111000,
457 B11111111,B11111111,B11111111,B11111111,
458 B11111111,B11111111,B11111111,B11111111,
459 B11111111,B11111111,B11111111,B11111111,
460 B11111111,B11111111,B11111111,B11111111,
461 B11111111,B11111111,B11111111,B11111111,
462 B11111111,B11111111,B11111111,B11111111,
463 B11111111,B11111111,B11111111,B11111111,
464 B11111111,B11111111,B11111111,B11111111,
465 B11111111,B11111111,B11111111,B11111111,
466 B11111111,B11111111,B11111111,B11111111,
467 B11111111,B11111111,B11111111,B11111111,
468 B11111111,B11111111,B11111111,B11111111,
469 B11111111,B11111111,B11111111,B11111111,
470 B01111111,B11111111,B11111111,B11111110,
471 B01111111,B11111111,B11111111,B11111110,
472 B00111111,B11111111,B11111111,B11111100,
473 B00011111,B11111111,B11111111,B11111000,
474 B00000111,B11111111,B11111111,B11100000,
475 };
476
477
478
479
480
481 static const unsigned char PROGMEM eye11d[] =
482 {
483 B00000000,B00000000,B00000000,B00000000,
484 B00000000,B00000000,B00000000,B00000000,
485 B00000000,B00000000,B00000000,B00000000,
486 B00000000,B00000000,B00000000,B00000000,
487 B00000000,B00000000,B00000000,B00000000,
488 B00000000,B00000000,B00000000,B00000000,
489 B00000000,B00000000,B00000000,B00000000,
490 B00000110,B00000000,B00000000,B00000000,
491 B00000111,B11000000,B00000000,B00000000,
492 B00001111,B11111000,B00000000,B00000000,
493 B00001111,B11111111,B00000000,B00000000,
494 B00001111,B11111111,B11100000,B00000000,
495 B00001111,B11111111,B11111100,B00000000,
496 B00001111,B11111111,B11111111,B10000000,
497 B00001111,B11111111,B11111111,B11110000,
498 B00001111,B11111111,B11111111,B11110000,
499 B00001111,B11111111,B11111111,B11110000,
500 B00001111,B11111111,B11111111,B11110000,
501 B00001111,B11111111,B11111111,B11110000,
502 B00001111,B11111111,B11111111,B11110000,
503 B00001111,B11111111,B11111111,B11110000,
504 B00001111,B11111111,B11111111,B11110000,
505 B00001111,B11111111,B11111111,B11110000,
506 B00000111,B11111111,B11111111,B11100000,
507 B00000111,B11111111,B11111111,B11100000,
508 B00000011,B11111111,B11111111,B11000000,
509 B00000001,B11111111,B11111111,B10000000,
510 B00000000,B01111111,B11111110,B00000000,
511 B00000000,B00000000,B00000000,B00000000,
512 B00000000,B00000000,B00000000,B00000000,
513 B00000000,B00000000,B00000000,B00000000,
514 B00000000,B00000000,B00000000,B00000000,
515 };
516
517
518
519
520
521 static const unsigned char PROGMEM eye11i[] =
522 {
523 B00000000,B00000000,B00000000,B00000000,
524 B00000000,B00000000,B00000000,B00000000,
525 B00000000,B00000000,B00000000,B00000000,
526 B00000000,B00000000,B00000000,B00000000,
527 B00000000,B00000000,B00000000,B00000000,
528 B00000000,B00000000,B00000000,B00000000,
529 B00000000,B00000000,B00000000,B00000000,
530 B00000000,B00000000,B00000000,B01100000,
531 B00000000,B00000000,B00000011,B11100000,
532 B00000000,B00000000,B00011111,B11110000,
533 B00000000,B00000000,B11111111,B11110000,
534 B00000000,B00000111,B11111111,B11110000,
535 B00000000,B00111111,B11111111,B11110000,
536 B00000001,B11111111,B11111111,B11110000,
537 B00001111,B11111111,B11111111,B11110000,
538 B00001111,B11111111,B11111111,B11110000,
539 B00001111,B11111111,B11111111,B11110000,
540 B00001111,B11111111,B11111111,B11110000,
541 B00001111,B11111111,B11111111,B11110000,
542 B00001111,B11111111,B11111111,B11110000,
543 B00001111,B11111111,B11111111,B11110000,
544 B00001111,B11111111,B11111111,B11110000,
545 B00001111,B11111111,B11111111,B11110000,
546 B00000111,B11111111,B11111111,B11100000,
547 B00000111,B11111111,B11111111,B11100000,
548 B00000011,B11111111,B11111111,B11000000,
549 B00000001,B11111111,B11111111,B10000000,
550 B00000000,B01111111,B11111110,B00000000,
551 B00000000,B00000000,B00000000,B00000000,
552 B00000000,B00000000,B00000000,B00000000,
553 B00000000,B00000000,B00000000,B00000000,
554 B00000000,B00000000,B00000000,B00000000,
555 };
556
557
558
559
560
561 static const unsigned char PROGMEM eye12d[] =
562 {
563 B00000000,B00000000,B00000000,B00000000,
564 B00000000,B00000000,B00000000,B00000000,
565 B00000000,B00000000,B00000000,B00000000,
566 B00000000,B00000000,B00000000,B00000000,
567 B00000000,B00000000,B00000000,B00000000,
568 B00000000,B00000000,B00000000,B00000000,
569 B00000000,B00000000,B00000000,B00000000,
570 B00000110,B00000000,B00000000,B00000000,
571 B00000111,B11000000,B00000000,B00000000,
572 B00001111,B11111000,B00000000,B00000000,
573 B00001111,B11111111,B00000000,B00000000,
574 B00001111,B11111111,B11100000,B00000000,
575 B00001111,B11111111,B11111100,B00000000,
576 B00001111,B11111111,B11111111,B10000000,
577 B00001111,B11111111,B11111111,B11110000,
578 B00001111,B11111111,B11111111,B11110000,
579 B00001111,B11111111,B11111111,B11110000,
580 B00001111,B11111111,B11111111,B11110000,
581 B00001111,B11111111,B11111111,B11110000,
582 B00001111,B11111111,B11111111,B11110000,
583 B00001111,B11111111,B11111111,B11110000,
584 B00001111,B11111111,B11111111,B11110000,
585 B00001111,B11111111,B11111111,B11110000,
586 B00001111,B11111111,B11111111,B11110000,
587 B00001111,B11111111,B11111111,B11110000,
588 B00001111,B11111111,B11111111,B11110000,
589 B00001111,B11111111,B11111111,B11110000,
590 B00000111,B11111111,B11111111,B11100000,
591 B00000111,B11111111,B11111111,B11100000,
592 B00000011,B11111111,B11111111,B11000000,
593 B00000001,B11111111,B11111111,B10000000,
594 B00000000,B01111111,B11111110,B00000000,
595 };
596
597
598
599
600
601 static const unsigned char PROGMEM eye12i[] =
602 {
603 B00000000,B00000000,B00000000,B00000000,
604 B00000000,B00000000,B00000000,B00000000,
605 B00000000,B00000000,B00000000,B00000000,
606 B00000000,B00000000,B00000000,B00000000,
607 B00000000,B00000000,B00000000,B00000000,
608 B00000000,B00000000,B00000000,B00000000,
609 B00000000,B00000000,B00000000,B00000000,
610 B00000000,B00000000,B00000000,B01100000,
611 B00000000,B00000000,B00000011,B11100000,
612 B00000000,B00000000,B00011111,B11110000,
613 B00000000,B00000000,B11111111,B11110000,
614 B00000000,B00000111,B11111111,B11110000,
615 B00000000,B00111111,B11111111,B11110000,
616 B00000001,B11111111,B11111111,B11110000,
617 B00001111,B11111111,B11111111,B11110000,
618 B00001111,B11111111,B11111111,B11110000,
619 B00001111,B11111111,B11111111,B11110000,
620 B00001111,B11111111,B11111111,B11110000,
621 B00001111,B11111111,B11111111,B11110000,
622 B00001111,B11111111,B11111111,B11110000,
623 B00001111,B11111111,B11111111,B11110000,
624 B00001111,B11111111,B11111111,B11110000,
625 B00001111,B11111111,B11111111,B11110000,
626 B00001111,B11111111,B11111111,B11110000,
627 B00001111,B11111111,B11111111,B11110000,
628 B00001111,B11111111,B11111111,B11110000,
629 B00001111,B11111111,B11111111,B11110000,
630 B00000111,B11111111,B11111111,B11100000,
631 B00000111,B11111111,B11111111,B11100000,
632 B00000011,B11111111,B11111111,B11000000,
633 B00000001,B11111111,B11111111,B10000000,
634 B00000000,B01111111,B11111110,B00000000,
635 };
636
637
638
639
640
641 static const unsigned char PROGMEM eye13d[] =
642 {
643 B00000000,B00000000,B00000000,B00000000,
644 B00000000,B00000000,B00000000,B00000000,
645 B00000000,B00000000,B00000000,B00000000,
646 B00000000,B00000000,B00000000,B00000000,
647 B00000000,B00000000,B00000000,B00000000,
648 B00000000,B00000000,B00000000,B00000000,
649 B00000000,B00000000,B00000000,B00000000,
650 B00000000,B00000000,B00000000,B00000000,
651 B00000000,B00000000,B00000000,B00000010,
652 B00000000,B00000000,B00000000,B00011111,
653 B00000000,B00000000,B00000000,B11111111,
654 B00000000,B00000000,B00000111,B11111111,
655 B00000000,B00000000,B00111111,B11111111,
656 B00000000,B00000001,B11111111,B11111111,
657 B00000000,B00001111,B11111111,B11111111,
658 B00000000,B01111111,B11111111,B11111111,
659 B00000011,B11111111,B11111111,B11111111,
660 B00011111,B11111111,B11111111,B11111111,
661 B11111111,B11111111,B11111111,B11111111,
662 B11111111,B11111111,B11111111,B11111111,
663 B11111111,B11111111,B11111111,B11111111,
664 B11111111,B11111111,B11111111,B11111111,
665 B11111111,B11111111,B11111111,B11111111,
666 B11111111,B11111111,B11111111,B11111111,
667 B11111111,B11111111,B11111111,B11111111,
668 B11111111,B11111111,B11111111,B11111111,
669 B11111111,B11111111,B11111111,B11111111,
670 B01111111,B11111111,B11111111,B11111110,
671 B01111111,B11111111,B11111111,B11111110,
672 B00111111,B11111111,B11111111,B11111100,
673 B00011111,B11111111,B11111111,B11111000,
674 B00000111,B11111111,B11111111,B11100000,
675 };
676
677
678
679
680
681 static const unsigned char PROGMEM eye13i[] =
682 {
683 B00000000,B00000000,B00000000,B00000000,
684 B00000000,B00000000,B00000000,B00000000,
685 B00000000,B00000000,B00000000,B00000000,
686 B00000000,B00000000,B00000000,B00000000,
687 B00000000,B00000000,B00000000,B00000000,
688 B00000000,B00000000,B00000000,B00000000,
689 B00000000,B00000000,B00000000,B00000000,
690 B00000000,B00000000,B00000000,B00000000,
691 B01000000,B00000000,B00000000,B00000000,
692 B11111000,B00000000,B00000000,B00000000,
693 B11111111,B00000000,B00000000,B00000000,
694 B11111111,B11100000,B00000000,B00000000,
695 B11111111,B11111100,B00000000,B00000000,
696 B11111111,B11111111,B10000000,B00000000,
697 B11111111,B11111111,B11110000,B00000000,
698 B11111111,B01111111,B11111110,B00000000,
699 B11111111,B11111111,B11111111,B11000000,
700 B11111111,B11111111,B11111111,B11111000,
701 B11111111,B11111111,B11111111,B11111111,
702 B11111111,B11111111,B11111111,B11111111,
703 B11111111,B11111111,B11111111,B11111111,
704 B11111111,B11111111,B11111111,B11111111,
705 B11111111,B11111111,B11111111,B11111111,
706 B11111111,B11111111,B11111111,B11111111,
707 B11111111,B11111111,B11111111,B11111111,
708 B11111111,B11111111,B11111111,B11111111,
709 B11111111,B11111111,B11111111,B11111111,
710 B01111111,B11111111,B11111111,B11111110,
711 B01111111,B11111111,B11111111,B11111110,
712 B00111111,B11111111,B11111111,B11111100,
713 B00011111,B11111111,B11111111,B11111000,
714 B00000111,B11111111,B11111111,B11100000,
715 };
716
717
718
719
720
721 static const unsigned char PROGMEM eye14i[] =
722 {
723 B00000000,B00000000,B00000000,B00000000,
724 B00000000,B00000000,B00000000,B00000000,
725 B00000000,B00000000,B00000000,B00000000,
726 B00000000,B00000000,B00000000,B00000000,
727 B00000000,B00000000,B00000000,B00000000,
728 B00000000,B00000000,B00000000,B00000000,
729 B00000000,B00000000,B00000000,B00000000,
730 B00000000,B00000000,B00000000,B00000000,
731 B00000000,B00000000,B00000000,B00000000,
732 B00000000,B00000000,B00000000,B00000000,
733 B00000000,B00000000,B00000000,B00000000,
734 B00000110,B00000000,B00000000,B00000000,
735 B00000111,B11000000,B00000000,B00000000,
736 B00001111,B11111000,B00000000,B00000000,
737 B00001111,B11111111,B00000000,B00000000,
738 B00001111,B11111111,B11100000,B00000000,
739 B00001111,B11111111,B11111100,B00000000,
740 B00001111,B11111111,B11111111,B10000000,
741 B00001111,B11111111,B11111111,B11110000,
742 B00001111,B11111111,B11111111,B11110000,
743 B00001111,B11111111,B11111111,B11110000,
744 B00001111,B11111111,B11111111,B11110000,
745 B00001111,B11111111,B11111111,B11110000,
746 B00000111,B11111111,B11111111,B11100000,
747 B00000111,B11111111,B11111111,B11100000,
748 B00000011,B11111111,B11111111,B11000000,
749 B00000001,B11111111,B11111111,B10000000,
750 B00000000,B01111111,B11111110,B00000000,
751 B00000000,B00000000,B00000000,B00000000,
752 B00000000,B00000000,B00000000,B00000000,
753 B00000000,B00000000,B00000000,B00000000,
754 B00000000,B00000000,B00000000,B00000000,
755 };
756
757
758
759
760
761 static const unsigned char PROGMEM eye14d[] =
762 {
763 B00000000,B00000000,B00000000,B00000000,
764 B00000000,B00000000,B00000000,B00000000,
765 B00000000,B00000000,B00000000,B00000000,
766 B00000000,B00000000,B00000000,B00000000,
767 B00000000,B00000000,B00000000,B00000000,
768 B00000000,B00000000,B00000000,B00000000,
769 B00000000,B00000000,B00000000,B00000000,
770 B00000000,B00000000,B00000000,B00000000,
771 B00000000,B00000000,B00000000,B00000000,
772 B00000000,B00000000,B00000000,B00000000,
773 B00000000,B00000000,B00000000,B00000000,
774 B00000000,B00000000,B00000000,B01100000,
775 B00000000,B00000000,B00000011,B11100000,
776 B00000000,B00000000,B00011111,B11110000,
777 B00000000,B00000000,B11111111,B11110000,
778 B00000000,B00000111,B11111111,B11110000,
779 B00000000,B00111111,B11111111,B11110000,
780 B00000001,B11111111,B11111111,B11110000,
781 B00001111,B11111111,B11111111,B11110000,
782 B00001111,B11111111,B11111111,B11110000,
783 B00001111,B11111111,B11111111,B11110000,
784 B00001111,B11111111,B11111111,B11110000,
785 B00001111,B11111111,B11111111,B11110000,
786 B00000111,B11111111,B11111111,B11100000,
787 B00000111,B11111111,B11111111,B11100000,
788 B00000011,B11111111,B11111111,B11000000,
789 B00000001,B11111111,B11111111,B10000000,
790 B00000000,B01111111,B11111110,B00000000,
791 B00000000,B00000000,B00000000,B00000000,
792 B00000000,B00000000,B00000000,B00000000,
793 B00000000,B00000000,B00000000,B00000000,
794 B00000000,B00000000,B00000000,B00000000,
795 };
796
797
798
799
800
801 static const unsigned char PROGMEM eye15i[] =
802 {
803 B00000000,B00000000,B00000000,B00000000,
804 B00000000,B00000000,B00000000,B00000000,
805 B00000000,B00000000,B00000000,B00000000,
806 B00000000,B00000000,B00000000,B00000000,
807 B00000000,B00000000,B00000000,B00000000,
808 B00000000,B00000000,B00000000,B00000000,
809 B00000000,B00000000,B00000000,B00000000,
810 B00000000,B00000000,B00000000,B00000000,
811 B00000000,B00000000,B00000000,B00000000,
812 B00000000,B00000000,B00000000,B00000000,
813 B00000000,B00000000,B00000000,B00000000,
814 B00000110,B00000000,B00000000,B00000000,
815 B00000111,B11000000,B00000000,B00000000,
816 B00001111,B11111000,B00000000,B00000000,
817 B00001111,B11111111,B00000000,B00000000,
818 B00001111,B11111111,B11100000,B00000000,
819 B00001111,B11111111,B11111100,B00000000,
820 B00001111,B11111111,B11111111,B10000000,
821 B00001111,B11111111,B11111111,B11110000,
822 B00001111,B11111111,B11111111,B11110000,
823 B00001111,B11111111,B11111111,B11110000,
824 B00001111,B11111111,B11111111,B11110000,
825 B00001111,B11111111,B11111111,B11110000,
826 B00001111,B11111111,B11111111,B11110000,
827 B00001111,B11111111,B11111111,B11110000,
828 B00001111,B11111111,B11111111,B11110000,
829 B00001111,B11111111,B11111111,B11110000,
830 B00000111,B11111111,B11111111,B11100000,
831 B00000111,B11111111,B11111111,B11100000,
832 B00000011,B11111111,B11111111,B11000000,
833 B00000001,B11111111,B11111111,B10000000,
834 B00000000,B01111111,B11111110,B00000000,
835 };
836
837
838
839
840
841 static const unsigned char PROGMEM eye15d[] =
842 {
843 B00000000,B00000000,B00000000,B00000000,
844 B00000000,B00000000,B00000000,B00000000,
845 B00000000,B00000000,B00000000,B00000000,
846 B00000000,B00000000,B00000000,B00000000,
847 B00000000,B00000000,B00000000,B00000000,
848 B00000000,B00000000,B00000000,B00000000,
849 B00000000,B00000000,B00000000,B00000000,
850 B00000000,B00000000,B00000000,B00000000,
851 B00000000,B00000000,B00000000,B00000000,
852 B00000000,B00000000,B00000000,B00000000,
853 B00000000,B00000000,B00000000,B00000000,
854 B00000000,B00000000,B00000000,B01100000,
855 B00000000,B00000000,B00000011,B11100000,
856 B00000000,B00000000,B00011111,B11110000,
857 B00000000,B00000000,B11111111,B11110000,
858 B00000000,B00000111,B11111111,B11110000,
859 B00000000,B00111111,B11111111,B11110000,
860 B00000001,B11111111,B11111111,B11110000,
861 B00001111,B11111111,B11111111,B11110000,
862 B00001111,B11111111,B11111111,B11110000,
863 B00001111,B11111111,B11111111,B11110000,
864 B00001111,B11111111,B11111111,B11110000,
865 B00001111,B11111111,B11111111,B11110000,
866 B00001111,B11111111,B11111111,B11110000,
867 B00001111,B11111111,B11111111,B11110000,
868 B00001111,B11111111,B11111111,B11110000,
869 B00001111,B11111111,B11111111,B11110000,
870 B00000111,B11111111,B11111111,B11100000,
871 B00000111,B11111111,B11111111,B11100000,
872 B00000011,B11111111,B11111111,B11000000,
873 B00000001,B11111111,B11111111,B10000000,
874 B00000000,B01111111,B11111110,B00000000,
875 };
876
877
878 // [mood][pos][l/r]
879 const unsigned char *peyes[][3][2]={
880 { { eye4, eye4},{ eye5, eye5},{ eye6, eye6} },
881 { { eye1, eye1},{ eye2, eye2},{ eye3, eye3} },
882 { { eye0, eye0},{ eye0, eye0},{ eye0, eye0} },
883 { { eye10d, eye10i},{ eye11d, eye11i},{ eye12d, eye12i} },
884 { { eye7, eye7},{ eye8, eye8},{ eye9, eye9} },
885 { { eye13d, eye13i},{ eye14d, eye14i},{ eye15d, eye15i} },
886 };
sources