Robot expression ( ecran OLED ) : Différence entre versions
(→sources) |
|||
Ligne 929 : | Ligne 929 : | ||
Voir aussi [https://www.wikidebrouillard.org/wiki/Visage_de_robot Visage de robot sur Wikidébrouilard] | Voir aussi [https://www.wikidebrouillard.org/wiki/Visage_de_robot Visage de robot sur Wikidébrouilard] | ||
+ | |||
+ | ==catégorie== | ||
+ | [[Catégorie:Arduino]] | ||
+ | [[Catégorie:Robot]] |
Version actuelle datée du 26 août 2024 à 08:35
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
il faut sur le logiciel arduino , creer un nouvel onglet qui s'appele eyes.h ; ca vas etre le catalogue des types d'oeils.
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 static const unsigned char PROGMEM eye1[] =
37 {
38 B00000111,B11111111,B11111111,B11100000,
39 B00011111,B11111111,B11111111,B11111000,
40 B00111111,B11111111,B11111111,B11111100,
41 B01111111,B11111111,B11111111,B11111110,
42 B01111111,B11111111,B11111111,B11111110,
43 B11111111,B11111111,B11111111,B11111111,
44 B11111111,B11111111,B11111111,B11111111,
45 B11111111,B11111111,B11111111,B11111111,
46 B11111111,B11111111,B11111111,B11111111,
47 B11111111,B11111111,B11111111,B11111111,
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 B01111111,B11111111,B11111111,B11111110,
66 B01111111,B11111111,B11111111,B11111110,
67 B00111111,B11111111,B11111111,B11111100,
68 B00011111,B11111111,B11111111,B11111000,
69 B00000111,B11111111,B11111111,B11100000,
70 };
71 static const unsigned char PROGMEM eye2[] =
72 {
73 B00000000,B00000000,B00000000,B00000000,
74 B00000000,B00000000,B00000000,B00000000,
75 B00000000,B00000000,B00000000,B00000000,
76 B00000000,B00000000,B00000000,B00000000,
77 B00000000,B01111111,B11111110,B00000000,
78 B00000001,B11111111,B11111111,B10000000,
79 B00000011,B11111111,B11111111,B11000000,
80 B00000111,B11111111,B11111111,B11100000,
81 B00000111,B11111111,B11111111,B11100000,
82 B00001111,B11111111,B11111111,B11110000,
83 B00001111,B11111111,B11111111,B11110000,
84 B00001111,B11111111,B11111111,B11110000,
85 B00001111,B11111111,B11111111,B11110000,
86 B00001111,B11111111,B11111111,B11110000,
87 B00001111,B11111111,B11111111,B11110000,
88 B00001111,B11111111,B11111111,B11110000,
89 B00001111,B11111111,B11111111,B11110000,
90 B00001111,B11111111,B11111111,B11110000,
91 B00001111,B11111111,B11111111,B11110000,
92 B00001111,B11111111,B11111111,B11110000,
93 B00001111,B11111111,B11111111,B11110000,
94 B00001111,B11111111,B11111111,B11110000,
95 B00001111,B11111111,B11111111,B11110000,
96 B00000111,B11111111,B11111111,B11100000,
97 B00000111,B11111111,B11111111,B11100000,
98 B00000011,B11111111,B11111111,B11000000,
99 B00000001,B11111111,B11111111,B10000000,
100 B00000000,B01111111,B11111110,B00000000,
101 B00000000,B00000000,B00000000,B00000000,
102 B00000000,B00000000,B00000000,B00000000,
103 B00000000,B00000000,B00000000,B00000000,
104 B00000000,B00000000,B00000000,B00000000,
105 };
106 static const unsigned char PROGMEM eye3[] =
107 {
108 B00000000,B01111111,B11111110,B00000000,
109 B00000001,B11111111,B11111111,B10000000,
110 B00000011,B11111111,B11111111,B11000000,
111 B00000111,B11111111,B11111111,B11100000,
112 B00000111,B11111111,B11111111,B11100000,
113 B00001111,B11111111,B11111111,B11110000,
114 B00001111,B11111111,B11111111,B11110000,
115 B00001111,B11111111,B11111111,B11110000,
116 B00001111,B11111111,B11111111,B11110000,
117 B00001111,B11111111,B11111111,B11110000,
118 B00001111,B11111111,B11111111,B11110000,
119 B00001111,B11111111,B11111111,B11110000,
120 B00001111,B11111111,B11111111,B11110000,
121 B00001111,B11111111,B11111111,B11110000,
122 B00001111,B11111111,B11111111,B11110000,
123 B00001111,B11111111,B11111111,B11110000,
124 B00001111,B11111111,B11111111,B11110000,
125 B00001111,B11111111,B11111111,B11110000,
126 B00001111,B11111111,B11111111,B11110000,
127 B00001111,B11111111,B11111111,B11110000,
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 B00000111,B11111111,B11111111,B11100000,
136 B00000111,B11111111,B11111111,B11100000,
137 B00000011,B11111111,B11111111,B11000000,
138 B00000001,B11111111,B11111111,B10000000,
139 B00000000,B01111111,B11111110,B00000000,
140 };
141 static const unsigned char PROGMEM eye4[] =
142 {
143 B00000111,B11111111,B11111111,B11100000,
144 B00011111,B11111111,B11111111,B11111000,
145 B00111111,B11111111,B11111111,B11111100,
146 B01111111,B11111111,B11111111,B11111110,
147 B01111111,B11111111,B11111111,B11111110,
148 B11111111,B11111111,B11111111,B11111111,
149 B11111111,B11111111,B11111111,B11111111,
150 B11111000,B00000000,B00000000,B00011111,
151 B11100000,B00000000,B00000000,B00000111,
152 B11000000,B00000000,B00000000,B00000011,
153 B10000000,B00000000,B00000000,B00000001,
154 B10000000,B00000000,B00000000,B00000001,
155 B00000000,B00000000,B00000000,B00000000,
156 B00000000,B00000000,B00000000,B00000000,
157 B00000000,B00000000,B00000000,B00000000,
158 B00000000,B00000000,B00000000,B00000000,
159 B00000000,B00000000,B00000000,B00000000,
160 B00000000,B00000000,B00000000,B00000000,
161 B00000000,B00000000,B00000000,B00000000,
162 B00000000,B00000000,B00000000,B00000000,
163 B00000000,B00000000,B00000000,B00000000,
164 B00000000,B00000000,B00000000,B00000000,
165 B00000000,B00000000,B00000000,B00000000,
166 B00000000,B00000000,B00000000,B00000000,
167 B00000000,B00000000,B00000000,B00000000,
168 B00000000,B00000000,B00000000,B00000000,
169 B00000000,B00000000,B00000000,B00000000,
170 B00000000,B00000000,B00000000,B00000000,
171 B00000000,B00000000,B00000000,B00000000,
172 B00000000,B00000000,B00000000,B00000000,
173 B00000000,B00000000,B00000000,B00000000,
174 B00000000,B00000000,B00000000,B00000000,
175 };
176 static const unsigned char PROGMEM eye5[] =
177 {
178 B00000000,B00000000,B00000000,B00000000,
179 B00000000,B00000000,B00000000,B00000000,
180 B00000000,B00000000,B00000000,B00000000,
181 B00000000,B00000000,B00000000,B00000000,
182 B00000000,B01111111,B11111110,B00000000,
183 B00000001,B11111111,B11111111,B10000000,
184 B00000011,B11111111,B11111111,B11000000,
185 B00000111,B11111111,B11111111,B11100000,
186 B00000111,B11111111,B11111111,B11100000,
187 B00001111,B11111111,B11111111,B11110000,
188 B00001111,B10000000,B00000001,B11110000,
189 B00001110,B00000000,B00000000,B01110000,
190 B00001100,B00000000,B00000000,B00110000,
191 B00001000,B00000000,B00000000,B00010000,
192 B00000000,B00000000,B00000000,B00000000,
193 B00000000,B00000000,B00000000,B00000000,
194 B00000000,B00000000,B00000000,B00000000,
195 B00000000,B00000000,B00000000,B00000000,
196 B00000000,B00000000,B00000000,B00000000,
197 B00000000,B00000000,B00000000,B00000000,
198 B00000000,B00000000,B00000000,B00000000,
199 B00000000,B00000000,B00000000,B00000000,
200 B00000000,B00000000,B00000000,B00000000,
201 B00000000,B00000000,B00000000,B00000000,
202 B00000000,B00000000,B00000000,B00000000,
203 B00000000,B00000000,B00000000,B00000000,
204 B00000000,B00000000,B00000000,B00000000,
205 B00000000,B00000000,B00000000,B00000000,
206 B00000000,B00000000,B00000000,B00000000,
207 B00000000,B00000000,B00000000,B00000000,
208 B00000000,B00000000,B00000000,B00000000,
209 B00000000,B00000000,B00000000,B00000000,
210 };
211 static const unsigned char PROGMEM eye6[] =
212 {
213 B00000000,B01111111,B11111110,B00000000,
214 B00000001,B11111111,B11111111,B10000000,
215 B00000011,B11111111,B11111111,B11000000,
216 B00000111,B11111111,B11111111,B11100000,
217 B00000111,B11111111,B11111111,B11100000,
218 B00001111,B11111111,B11111111,B11110000,
219 B00001111,B10000000,B00000001,B11110000,
220 B00001110,B00000000,B00000000,B01110000,
221 B00001100,B00000000,B00000000,B00110000,
222 B00001000,B00000000,B00000000,B00010000,
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 B00000000,B00000000,B00000000,B00000000,
236 B00000000,B00000000,B00000000,B00000000,
237 B00000000,B00000000,B00000000,B00000000,
238 B00000000,B00000000,B00000000,B00000000,
239 B00000000,B00000000,B00000000,B00000000,
240 B00000000,B00000000,B00000000,B00000000,
241 B00000000,B00000000,B00000000,B00000000,
242 B00000000,B00000000,B00000000,B00000000,
243 B00000000,B00000000,B00000000,B00000000,
244 B00000000,B00000000,B00000000,B00000000,
245 };
246 static const unsigned char PROGMEM eye7[] =
247 {
248 B00000000,B00000000,B00000000,B00000000,
249 B00000000,B00000000,B00000000,B00000000,
250 B00000000,B00000000,B00000000,B00000000,
251 B00000000,B00000000,B00000000,B00000000,
252 B00000000,B00000000,B00000000,B00000000,
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 B11111111,B11111111,B11111111,B11111111,
265 B11111111,B11111111,B11111111,B11111111,
266 B11111111,B11111111,B11111111,B11111111,
267 B11111111,B11111111,B11111111,B11111111,
268 B11111111,B11111111,B11111111,B11111111,
269 B11111111,B11111111,B11111111,B11111111,
270 B11111111,B11111111,B11111111,B11111111,
271 B11111111,B11111111,B11111111,B11111111,
272 B11111111,B11111111,B11111111,B11111111,
273 B11111111,B11111111,B11111111,B11111111,
274 B11111111,B11111111,B11111111,B11111111,
275 B01111111,B11111111,B11111111,B11111110,
276 B01111111,B11111111,B11111111,B11111110,
277 B00111111,B11111111,B11111111,B11111100,
278 B00011111,B11111111,B11111111,B11111000,
279 B00000111,B11111111,B11111111,B11100000,
280 };
281 static const unsigned char PROGMEM eye8[] =
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 B00001111,B11111111,B11111111,B11110000,
300 B00001111,B11111111,B11111111,B11110000,
301 B00001111,B11111111,B11111111,B11110000,
302 B00001111,B11111111,B11111111,B11110000,
303 B00001111,B11111111,B11111111,B11110000,
304 B00001111,B11111111,B11111111,B11110000,
305 B00001111,B11111111,B11111111,B11110000,
306 B00000111,B11111111,B11111111,B11100000,
307 B00000111,B11111111,B11111111,B11100000,
308 B00000011,B11111111,B11111111,B11000000,
309 B00000001,B11111111,B11111111,B10000000,
310 B00000000,B01111111,B11111110,B00000000,
311 B00000000,B00000000,B00000000,B00000000,
312 B00000000,B00000000,B00000000,B00000000,
313 B00000000,B00000000,B00000000,B00000000,
314 B00000000,B00000000,B00000000,B00000000,
315 };
316 static const unsigned char PROGMEM eye9[] =
317 {
318 B00000000,B00000000,B00000000,B00000000,
319 B00000000,B00000000,B00000000,B00000000,
320 B00000000,B00000000,B00000000,B00000000,
321 B00000000,B00000000,B00000000,B00000000,
322 B00000000,B00000000,B00000000,B00000000,
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 B00001111,B11111111,B11111111,B11110000,
335 B00001111,B11111111,B11111111,B11110000,
336 B00001111,B11111111,B11111111,B11110000,
337 B00001111,B11111111,B11111111,B11110000,
338 B00001111,B11111111,B11111111,B11110000,
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 B00000111,B11111111,B11111111,B11100000,
346 B00000111,B11111111,B11111111,B11100000,
347 B00000011,B11111111,B11111111,B11000000,
348 B00000001,B11111111,B11111111,B10000000,
349 B00000000,B01111111,B11111110,B00000000,
350 };
351 static const unsigned char PROGMEM eye10i[] =
352 {
353 B00000000,B00000000,B00000000,B00000000,
354 B00000000,B00000000,B00000000,B00000000,
355 B00000000,B00000000,B00000000,B00000000,
356 B00000000,B00000000,B00000000,B00000000,
357 B00000000,B00000000,B00000000,B00000010,
358 B00000000,B00000000,B00000000,B00011111,
359 B00000000,B00000000,B00000000,B11111111,
360 B00000000,B00000000,B00000111,B11111111,
361 B00000000,B00000000,B00111111,B11111111,
362 B00000000,B00000001,B11111111,B11111111,
363 B00000000,B00001111,B11111111,B11111111,
364 B00000000,B01111111,B11111111,B11111111,
365 B00000011,B11111111,B11111111,B11111111,
366 B00011111,B11111111,B11111111,B11111111,
367 B11111111,B11111111,B11111111,B11111111,
368 B11111111,B11111111,B11111111,B11111111,
369 B11111111,B11111111,B11111111,B11111111,
370 B11111111,B11111111,B11111111,B11111111,
371 B11111111,B11111111,B11111111,B11111111,
372 B11111111,B11111111,B11111111,B11111111,
373 B11111111,B11111111,B11111111,B11111111,
374 B11111111,B11111111,B11111111,B11111111,
375 B11111111,B11111111,B11111111,B11111111,
376 B11111111,B11111111,B11111111,B11111111,
377 B11111111,B11111111,B11111111,B11111111,
378 B11111111,B11111111,B11111111,B11111111,
379 B11111111,B11111111,B11111111,B11111111,
380 B01111111,B11111111,B11111111,B11111110,
381 B01111111,B11111111,B11111111,B11111110,
382 B00111111,B11111111,B11111111,B11111100,
383 B00011111,B11111111,B11111111,B11111000,
384 B00000111,B11111111,B11111111,B11100000,
385 };
386 static const unsigned char PROGMEM eye10d[] =
387 {
388 B00000000,B00000000,B00000000,B00000000,
389 B00000000,B00000000,B00000000,B00000000,
390 B00000000,B00000000,B00000000,B00000000,
391 B00000000,B00000000,B00000000,B00000000,
392 B01000000,B00000000,B00000000,B00000000,
393 B11111000,B00000000,B00000000,B00000000,
394 B11111111,B00000000,B00000000,B00000000,
395 B11111111,B11100000,B00000000,B00000000,
396 B11111111,B11111100,B00000000,B00000000,
397 B11111111,B11111111,B10000000,B00000000,
398 B11111111,B11111111,B11110000,B00000000,
399 B11111111,B01111111,B11111110,B00000000,
400 B11111111,B11111111,B11111111,B11000000,
401 B11111111,B11111111,B11111111,B11111000,
402 B11111111,B11111111,B11111111,B11111111,
403 B11111111,B11111111,B11111111,B11111111,
404 B11111111,B11111111,B11111111,B11111111,
405 B11111111,B11111111,B11111111,B11111111,
406 B11111111,B11111111,B11111111,B11111111,
407 B11111111,B11111111,B11111111,B11111111,
408 B11111111,B11111111,B11111111,B11111111,
409 B11111111,B11111111,B11111111,B11111111,
410 B11111111,B11111111,B11111111,B11111111,
411 B11111111,B11111111,B11111111,B11111111,
412 B11111111,B11111111,B11111111,B11111111,
413 B11111111,B11111111,B11111111,B11111111,
414 B11111111,B11111111,B11111111,B11111111,
415 B01111111,B11111111,B11111111,B11111110,
416 B01111111,B11111111,B11111111,B11111110,
417 B00111111,B11111111,B11111111,B11111100,
418 B00011111,B11111111,B11111111,B11111000,
419 B00000111,B11111111,B11111111,B11100000,
420 };
421 static const unsigned char PROGMEM eye11d[] =
422 {
423 B00000000,B00000000,B00000000,B00000000,
424 B00000000,B00000000,B00000000,B00000000,
425 B00000000,B00000000,B00000000,B00000000,
426 B00000000,B00000000,B00000000,B00000000,
427 B00000000,B00000000,B00000000,B00000000,
428 B00000000,B00000000,B00000000,B00000000,
429 B00000000,B00000000,B00000000,B00000000,
430 B00000110,B00000000,B00000000,B00000000,
431 B00000111,B11000000,B00000000,B00000000,
432 B00001111,B11111000,B00000000,B00000000,
433 B00001111,B11111111,B00000000,B00000000,
434 B00001111,B11111111,B11100000,B00000000,
435 B00001111,B11111111,B11111100,B00000000,
436 B00001111,B11111111,B11111111,B10000000,
437 B00001111,B11111111,B11111111,B11110000,
438 B00001111,B11111111,B11111111,B11110000,
439 B00001111,B11111111,B11111111,B11110000,
440 B00001111,B11111111,B11111111,B11110000,
441 B00001111,B11111111,B11111111,B11110000,
442 B00001111,B11111111,B11111111,B11110000,
443 B00001111,B11111111,B11111111,B11110000,
444 B00001111,B11111111,B11111111,B11110000,
445 B00001111,B11111111,B11111111,B11110000,
446 B00000111,B11111111,B11111111,B11100000,
447 B00000111,B11111111,B11111111,B11100000,
448 B00000011,B11111111,B11111111,B11000000,
449 B00000001,B11111111,B11111111,B10000000,
450 B00000000,B01111111,B11111110,B00000000,
451 B00000000,B00000000,B00000000,B00000000,
452 B00000000,B00000000,B00000000,B00000000,
453 B00000000,B00000000,B00000000,B00000000,
454 B00000000,B00000000,B00000000,B00000000,
455 };
456 static const unsigned char PROGMEM eye11i[] =
457 {
458 B00000000,B00000000,B00000000,B00000000,
459 B00000000,B00000000,B00000000,B00000000,
460 B00000000,B00000000,B00000000,B00000000,
461 B00000000,B00000000,B00000000,B00000000,
462 B00000000,B00000000,B00000000,B00000000,
463 B00000000,B00000000,B00000000,B00000000,
464 B00000000,B00000000,B00000000,B00000000,
465 B00000000,B00000000,B00000000,B01100000,
466 B00000000,B00000000,B00000011,B11100000,
467 B00000000,B00000000,B00011111,B11110000,
468 B00000000,B00000000,B11111111,B11110000,
469 B00000000,B00000111,B11111111,B11110000,
470 B00000000,B00111111,B11111111,B11110000,
471 B00000001,B11111111,B11111111,B11110000,
472 B00001111,B11111111,B11111111,B11110000,
473 B00001111,B11111111,B11111111,B11110000,
474 B00001111,B11111111,B11111111,B11110000,
475 B00001111,B11111111,B11111111,B11110000,
476 B00001111,B11111111,B11111111,B11110000,
477 B00001111,B11111111,B11111111,B11110000,
478 B00001111,B11111111,B11111111,B11110000,
479 B00001111,B11111111,B11111111,B11110000,
480 B00001111,B11111111,B11111111,B11110000,
481 B00000111,B11111111,B11111111,B11100000,
482 B00000111,B11111111,B11111111,B11100000,
483 B00000011,B11111111,B11111111,B11000000,
484 B00000001,B11111111,B11111111,B10000000,
485 B00000000,B01111111,B11111110,B00000000,
486 B00000000,B00000000,B00000000,B00000000,
487 B00000000,B00000000,B00000000,B00000000,
488 B00000000,B00000000,B00000000,B00000000,
489 B00000000,B00000000,B00000000,B00000000,
490 };
491 static const unsigned char PROGMEM eye12d[] =
492 {
493 B00000000,B00000000,B00000000,B00000000,
494 B00000000,B00000000,B00000000,B00000000,
495 B00000000,B00000000,B00000000,B00000000,
496 B00000000,B00000000,B00000000,B00000000,
497 B00000000,B00000000,B00000000,B00000000,
498 B00000000,B00000000,B00000000,B00000000,
499 B00000000,B00000000,B00000000,B00000000,
500 B00000110,B00000000,B00000000,B00000000,
501 B00000111,B11000000,B00000000,B00000000,
502 B00001111,B11111000,B00000000,B00000000,
503 B00001111,B11111111,B00000000,B00000000,
504 B00001111,B11111111,B11100000,B00000000,
505 B00001111,B11111111,B11111100,B00000000,
506 B00001111,B11111111,B11111111,B10000000,
507 B00001111,B11111111,B11111111,B11110000,
508 B00001111,B11111111,B11111111,B11110000,
509 B00001111,B11111111,B11111111,B11110000,
510 B00001111,B11111111,B11111111,B11110000,
511 B00001111,B11111111,B11111111,B11110000,
512 B00001111,B11111111,B11111111,B11110000,
513 B00001111,B11111111,B11111111,B11110000,
514 B00001111,B11111111,B11111111,B11110000,
515 B00001111,B11111111,B11111111,B11110000,
516 B00001111,B11111111,B11111111,B11110000,
517 B00001111,B11111111,B11111111,B11110000,
518 B00001111,B11111111,B11111111,B11110000,
519 B00001111,B11111111,B11111111,B11110000,
520 B00000111,B11111111,B11111111,B11100000,
521 B00000111,B11111111,B11111111,B11100000,
522 B00000011,B11111111,B11111111,B11000000,
523 B00000001,B11111111,B11111111,B10000000,
524 B00000000,B01111111,B11111110,B00000000,
525 };
526 static const unsigned char PROGMEM eye12i[] =
527 {
528 B00000000,B00000000,B00000000,B00000000,
529 B00000000,B00000000,B00000000,B00000000,
530 B00000000,B00000000,B00000000,B00000000,
531 B00000000,B00000000,B00000000,B00000000,
532 B00000000,B00000000,B00000000,B00000000,
533 B00000000,B00000000,B00000000,B00000000,
534 B00000000,B00000000,B00000000,B00000000,
535 B00000000,B00000000,B00000000,B01100000,
536 B00000000,B00000000,B00000011,B11100000,
537 B00000000,B00000000,B00011111,B11110000,
538 B00000000,B00000000,B11111111,B11110000,
539 B00000000,B00000111,B11111111,B11110000,
540 B00000000,B00111111,B11111111,B11110000,
541 B00000001,B11111111,B11111111,B11110000,
542 B00001111,B11111111,B11111111,B11110000,
543 B00001111,B11111111,B11111111,B11110000,
544 B00001111,B11111111,B11111111,B11110000,
545 B00001111,B11111111,B11111111,B11110000,
546 B00001111,B11111111,B11111111,B11110000,
547 B00001111,B11111111,B11111111,B11110000,
548 B00001111,B11111111,B11111111,B11110000,
549 B00001111,B11111111,B11111111,B11110000,
550 B00001111,B11111111,B11111111,B11110000,
551 B00001111,B11111111,B11111111,B11110000,
552 B00001111,B11111111,B11111111,B11110000,
553 B00001111,B11111111,B11111111,B11110000,
554 B00001111,B11111111,B11111111,B11110000,
555 B00000111,B11111111,B11111111,B11100000,
556 B00000111,B11111111,B11111111,B11100000,
557 B00000011,B11111111,B11111111,B11000000,
558 B00000001,B11111111,B11111111,B10000000,
559 B00000000,B01111111,B11111110,B00000000,
560 };
561 static const unsigned char PROGMEM eye13d[] =
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 B00000000,B00000000,B00000000,B00000000,
571 B00000000,B00000000,B00000000,B00000010,
572 B00000000,B00000000,B00000000,B00011111,
573 B00000000,B00000000,B00000000,B11111111,
574 B00000000,B00000000,B00000111,B11111111,
575 B00000000,B00000000,B00111111,B11111111,
576 B00000000,B00000001,B11111111,B11111111,
577 B00000000,B00001111,B11111111,B11111111,
578 B00000000,B01111111,B11111111,B11111111,
579 B00000011,B11111111,B11111111,B11111111,
580 B00011111,B11111111,B11111111,B11111111,
581 B11111111,B11111111,B11111111,B11111111,
582 B11111111,B11111111,B11111111,B11111111,
583 B11111111,B11111111,B11111111,B11111111,
584 B11111111,B11111111,B11111111,B11111111,
585 B11111111,B11111111,B11111111,B11111111,
586 B11111111,B11111111,B11111111,B11111111,
587 B11111111,B11111111,B11111111,B11111111,
588 B11111111,B11111111,B11111111,B11111111,
589 B11111111,B11111111,B11111111,B11111111,
590 B01111111,B11111111,B11111111,B11111110,
591 B01111111,B11111111,B11111111,B11111110,
592 B00111111,B11111111,B11111111,B11111100,
593 B00011111,B11111111,B11111111,B11111000,
594 B00000111,B11111111,B11111111,B11100000,
595 };
596 static const unsigned char PROGMEM eye13i[] =
597 {
598 B00000000,B00000000,B00000000,B00000000,
599 B00000000,B00000000,B00000000,B00000000,
600 B00000000,B00000000,B00000000,B00000000,
601 B00000000,B00000000,B00000000,B00000000,
602 B00000000,B00000000,B00000000,B00000000,
603 B00000000,B00000000,B00000000,B00000000,
604 B00000000,B00000000,B00000000,B00000000,
605 B00000000,B00000000,B00000000,B00000000,
606 B01000000,B00000000,B00000000,B00000000,
607 B11111000,B00000000,B00000000,B00000000,
608 B11111111,B00000000,B00000000,B00000000,
609 B11111111,B11100000,B00000000,B00000000,
610 B11111111,B11111100,B00000000,B00000000,
611 B11111111,B11111111,B10000000,B00000000,
612 B11111111,B11111111,B11110000,B00000000,
613 B11111111,B01111111,B11111110,B00000000,
614 B11111111,B11111111,B11111111,B11000000,
615 B11111111,B11111111,B11111111,B11111000,
616 B11111111,B11111111,B11111111,B11111111,
617 B11111111,B11111111,B11111111,B11111111,
618 B11111111,B11111111,B11111111,B11111111,
619 B11111111,B11111111,B11111111,B11111111,
620 B11111111,B11111111,B11111111,B11111111,
621 B11111111,B11111111,B11111111,B11111111,
622 B11111111,B11111111,B11111111,B11111111,
623 B11111111,B11111111,B11111111,B11111111,
624 B11111111,B11111111,B11111111,B11111111,
625 B01111111,B11111111,B11111111,B11111110,
626 B01111111,B11111111,B11111111,B11111110,
627 B00111111,B11111111,B11111111,B11111100,
628 B00011111,B11111111,B11111111,B11111000,
629 B00000111,B11111111,B11111111,B11100000,
630 };
631 static const unsigned char PROGMEM eye14i[] =
632 {
633 B00000000,B00000000,B00000000,B00000000,
634 B00000000,B00000000,B00000000,B00000000,
635 B00000000,B00000000,B00000000,B00000000,
636 B00000000,B00000000,B00000000,B00000000,
637 B00000000,B00000000,B00000000,B00000000,
638 B00000000,B00000000,B00000000,B00000000,
639 B00000000,B00000000,B00000000,B00000000,
640 B00000000,B00000000,B00000000,B00000000,
641 B00000000,B00000000,B00000000,B00000000,
642 B00000000,B00000000,B00000000,B00000000,
643 B00000000,B00000000,B00000000,B00000000,
644 B00000110,B00000000,B00000000,B00000000,
645 B00000111,B11000000,B00000000,B00000000,
646 B00001111,B11111000,B00000000,B00000000,
647 B00001111,B11111111,B00000000,B00000000,
648 B00001111,B11111111,B11100000,B00000000,
649 B00001111,B11111111,B11111100,B00000000,
650 B00001111,B11111111,B11111111,B10000000,
651 B00001111,B11111111,B11111111,B11110000,
652 B00001111,B11111111,B11111111,B11110000,
653 B00001111,B11111111,B11111111,B11110000,
654 B00001111,B11111111,B11111111,B11110000,
655 B00001111,B11111111,B11111111,B11110000,
656 B00000111,B11111111,B11111111,B11100000,
657 B00000111,B11111111,B11111111,B11100000,
658 B00000011,B11111111,B11111111,B11000000,
659 B00000001,B11111111,B11111111,B10000000,
660 B00000000,B01111111,B11111110,B00000000,
661 B00000000,B00000000,B00000000,B00000000,
662 B00000000,B00000000,B00000000,B00000000,
663 B00000000,B00000000,B00000000,B00000000,
664 B00000000,B00000000,B00000000,B00000000,
665 };
666 static const unsigned char PROGMEM eye14d[] =
667 {
668 B00000000,B00000000,B00000000,B00000000,
669 B00000000,B00000000,B00000000,B00000000,
670 B00000000,B00000000,B00000000,B00000000,
671 B00000000,B00000000,B00000000,B00000000,
672 B00000000,B00000000,B00000000,B00000000,
673 B00000000,B00000000,B00000000,B00000000,
674 B00000000,B00000000,B00000000,B00000000,
675 B00000000,B00000000,B00000000,B00000000,
676 B00000000,B00000000,B00000000,B00000000,
677 B00000000,B00000000,B00000000,B00000000,
678 B00000000,B00000000,B00000000,B00000000,
679 B00000000,B00000000,B00000000,B01100000,
680 B00000000,B00000000,B00000011,B11100000,
681 B00000000,B00000000,B00011111,B11110000,
682 B00000000,B00000000,B11111111,B11110000,
683 B00000000,B00000111,B11111111,B11110000,
684 B00000000,B00111111,B11111111,B11110000,
685 B00000001,B11111111,B11111111,B11110000,
686 B00001111,B11111111,B11111111,B11110000,
687 B00001111,B11111111,B11111111,B11110000,
688 B00001111,B11111111,B11111111,B11110000,
689 B00001111,B11111111,B11111111,B11110000,
690 B00001111,B11111111,B11111111,B11110000,
691 B00000111,B11111111,B11111111,B11100000,
692 B00000111,B11111111,B11111111,B11100000,
693 B00000011,B11111111,B11111111,B11000000,
694 B00000001,B11111111,B11111111,B10000000,
695 B00000000,B01111111,B11111110,B00000000,
696 B00000000,B00000000,B00000000,B00000000,
697 B00000000,B00000000,B00000000,B00000000,
698 B00000000,B00000000,B00000000,B00000000,
699 B00000000,B00000000,B00000000,B00000000,
700 };
701 static const unsigned char PROGMEM eye15i[] =
702 {
703 B00000000,B00000000,B00000000,B00000000,
704 B00000000,B00000000,B00000000,B00000000,
705 B00000000,B00000000,B00000000,B00000000,
706 B00000000,B00000000,B00000000,B00000000,
707 B00000000,B00000000,B00000000,B00000000,
708 B00000000,B00000000,B00000000,B00000000,
709 B00000000,B00000000,B00000000,B00000000,
710 B00000000,B00000000,B00000000,B00000000,
711 B00000000,B00000000,B00000000,B00000000,
712 B00000000,B00000000,B00000000,B00000000,
713 B00000000,B00000000,B00000000,B00000000,
714 B00000110,B00000000,B00000000,B00000000,
715 B00000111,B11000000,B00000000,B00000000,
716 B00001111,B11111000,B00000000,B00000000,
717 B00001111,B11111111,B00000000,B00000000,
718 B00001111,B11111111,B11100000,B00000000,
719 B00001111,B11111111,B11111100,B00000000,
720 B00001111,B11111111,B11111111,B10000000,
721 B00001111,B11111111,B11111111,B11110000,
722 B00001111,B11111111,B11111111,B11110000,
723 B00001111,B11111111,B11111111,B11110000,
724 B00001111,B11111111,B11111111,B11110000,
725 B00001111,B11111111,B11111111,B11110000,
726 B00001111,B11111111,B11111111,B11110000,
727 B00001111,B11111111,B11111111,B11110000,
728 B00001111,B11111111,B11111111,B11110000,
729 B00001111,B11111111,B11111111,B11110000,
730 B00000111,B11111111,B11111111,B11100000,
731 B00000111,B11111111,B11111111,B11100000,
732 B00000011,B11111111,B11111111,B11000000,
733 B00000001,B11111111,B11111111,B10000000,
734 B00000000,B01111111,B11111110,B00000000,
735 };
736 static const unsigned char PROGMEM eye15d[] =
737 {
738 B00000000,B00000000,B00000000,B00000000,
739 B00000000,B00000000,B00000000,B00000000,
740 B00000000,B00000000,B00000000,B00000000,
741 B00000000,B00000000,B00000000,B00000000,
742 B00000000,B00000000,B00000000,B00000000,
743 B00000000,B00000000,B00000000,B00000000,
744 B00000000,B00000000,B00000000,B00000000,
745 B00000000,B00000000,B00000000,B00000000,
746 B00000000,B00000000,B00000000,B00000000,
747 B00000000,B00000000,B00000000,B00000000,
748 B00000000,B00000000,B00000000,B00000000,
749 B00000000,B00000000,B00000000,B01100000,
750 B00000000,B00000000,B00000011,B11100000,
751 B00000000,B00000000,B00011111,B11110000,
752 B00000000,B00000000,B11111111,B11110000,
753 B00000000,B00000111,B11111111,B11110000,
754 B00000000,B00111111,B11111111,B11110000,
755 B00000001,B11111111,B11111111,B11110000,
756 B00001111,B11111111,B11111111,B11110000,
757 B00001111,B11111111,B11111111,B11110000,
758 B00001111,B11111111,B11111111,B11110000,
759 B00001111,B11111111,B11111111,B11110000,
760 B00001111,B11111111,B11111111,B11110000,
761 B00001111,B11111111,B11111111,B11110000,
762 B00001111,B11111111,B11111111,B11110000,
763 B00001111,B11111111,B11111111,B11110000,
764 B00001111,B11111111,B11111111,B11110000,
765 B00000111,B11111111,B11111111,B11100000,
766 B00000111,B11111111,B11111111,B11100000,
767 B00000011,B11111111,B11111111,B11000000,
768 B00000001,B11111111,B11111111,B10000000,
769 B00000000,B01111111,B11111110,B00000000,
770 };
771 // [mood][pos][l/r]
772 const unsigned char *peyes[][3][2]={
773 { { eye4, eye4},{ eye5, eye5},{ eye6, eye6} },
774 { { eye1, eye1},{ eye2, eye2},{ eye3, eye3} },
775 { { eye0, eye0},{ eye0, eye0},{ eye0, eye0} },
776 { { eye10d, eye10i},{ eye11d, eye11i},{ eye12d, eye12i} },
777 { { eye7, eye7},{ eye8, eye8},{ eye9, eye9} },
778 { { eye13d, eye13i},{ eye14d, eye14i},{ eye15d, eye15i} },
779 };
sources
Voir aussi Visage de robot sur Wikidébrouilard