-
Notifications
You must be signed in to change notification settings - Fork 0
/
Statusbar_icons_android_U8G2.ino
438 lines (362 loc) · 19.6 KB
/
Statusbar_icons_android_U8G2.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
/* Statusbar_icons_android_U8G2
** Copyright (c) 2021 JDJ-ELECTRONICS
**
** TERMS OF USE: MIT License. See bottom of file.
***************************************************************************
Arduino-IDE settings for AVR128DB32:
- Chip: "AVR128DB32"
- Clock Speed: "24MHz internal"
- millis()/micros() timer: "TCB2 (recomended)"
- BOD level if enabled (Bootload burn req'd): "1.9V"
- BOD Mode Active/Sleeping (Bootload burn req'd): "Disabled/Disabled"
- Save EEPROM (Bootload burn req'd): "EEPROM retained"
- Reset pin function (Bootload burn req'd): "Hardware Reset (recomended)"
- Startup Time (Bootload burn req'd): "8ms"
- Flash writing: "Disabled"
- Attachinterrupt() Version: "On all pins, like usual"
- Port: <select correct port>
- Programmer:"jtag2updi"
==================================
==> DxCore version 1.3.8 <==
==================================
Pinwap i2c = SDA1, SCL1
*/
#include <Arduino.h>
#include <U8g2lib.h>
#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif
U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL1, /* data=*/ SDA1, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
//U8G2_SH1106_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL1, /* data=*/ SDA1, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display
uint32_t draw_Interval;
//=============================================================================
//---Easter egg ;-)--- 60 by 35 pixels
const unsigned char trex[] U8X8_PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xfe,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xfe, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff,
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x0f,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xf0, 0x03,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0xff, 0x1f,
0x00, 0x00, 0x00, 0x00, 0x80, 0xc7, 0xff, 0x13, 0x00, 0x00, 0x00, 0x00,
0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03,
0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xf1, 0x3f, 0xfe,
0xff, 0xff, 0xff, 0x0f, 0x00, 0xc0, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xc0, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x20, 0x08,
0x00, 0x0f, 0x00, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03,
0x3c, 0x40, 0x20, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00,
0x00, 0x00, 0x00, 0x00 };
const unsigned char trex_cactus[] U8X8_PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x80, 0xff, 0x01, 0x80, 0x0f, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x60, 0xfe,
0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x60, 0xfe, 0x03, 0x80, 0x0f, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x98, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0xff,
0x03, 0x9c, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x9c, 0xcf, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x9c, 0xcf, 0x01, 0x00, 0x00, 0xe0, 0x0f,
0x00, 0x9c, 0xcf, 0x01, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x9c, 0xcf, 0x01,
0x00, 0x00, 0xe0, 0x03, 0x00, 0x9c, 0xcf, 0x01, 0x80, 0x00, 0xf0, 0x03,
0x00, 0x9c, 0xcf, 0x01, 0x80, 0x00, 0xfc, 0x03, 0x00, 0x9c, 0xff, 0x00,
0x80, 0x00, 0xff, 0x1f, 0x00, 0x9c, 0x7f, 0x00, 0x80, 0x83, 0xff, 0x1f,
0x00, 0x9c, 0x0f, 0x00, 0x80, 0xc7, 0xff, 0x13, 0x00, 0x98, 0x0f, 0x00,
0x80, 0xff, 0xff, 0x03, 0x00, 0xf8, 0x0f, 0x00, 0x80, 0xff, 0xff, 0x03,
0x00, 0xf0, 0x0f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xff, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfe, 0xff, 0x01,
0x00, 0x80, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xf8, 0x7f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0xfc, 0xf1, 0x3f, 0xfe,
0xff, 0x9f, 0xcf, 0x0f, 0x00, 0xc0, 0x37, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xc0, 0x33, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x80, 0xc3, 0x20, 0x08,
0x00, 0x8f, 0x0f, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03,
0x3c, 0x40, 0x20, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00,
0x00, 0x00, 0x00, 0x00 };
const unsigned char trex_scared[] U8X8_PROGMEM = {
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x08, 0x00, 0x00, 0x00,
0x00, 0x80, 0x0f, 0x00, 0xc0, 0x01, 0x80, 0xff, 0x01, 0x80, 0x0f, 0x00,
0xe0, 0x03, 0xe0, 0xff, 0x03, 0x80, 0x0f, 0x00, 0xe0, 0x03, 0x60, 0xfc,
0x03, 0x80, 0x0f, 0x00, 0xe2, 0x03, 0x60, 0xfd, 0x03, 0x80, 0x0f, 0x00,
0xc0, 0x01, 0x60, 0xfc, 0x03, 0x98, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0xff,
0x03, 0x9c, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x03, 0x9c, 0xcf, 0x00,
0x00, 0x00, 0xe0, 0xff, 0x03, 0x9c, 0xcf, 0x01, 0x00, 0x00, 0xe0, 0x7f,
0x00, 0x9c, 0xcf, 0x01, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x9c, 0xcf, 0x01,
0x00, 0x00, 0xe0, 0x03, 0x00, 0x9c, 0xcf, 0x01, 0x80, 0x00, 0xf0, 0x03,
0x00, 0x9c, 0xcf, 0x01, 0x80, 0x00, 0xfc, 0x03, 0x00, 0x9c, 0xff, 0x00,
0x80, 0x00, 0xff, 0x1f, 0x00, 0x9c, 0x7f, 0x00, 0x80, 0x83, 0xff, 0x1f,
0x00, 0x9c, 0x0f, 0x00, 0x80, 0xc7, 0xff, 0x13, 0x00, 0x98, 0x0f, 0x00,
0x80, 0xff, 0xff, 0x03, 0x00, 0xf8, 0x0f, 0x00, 0x80, 0xff, 0xff, 0x03,
0x00, 0xf0, 0x0f, 0x00, 0x80, 0xff, 0xff, 0x03, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xff, 0xff, 0x01, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfe, 0xff, 0x01,
0x00, 0x80, 0x0f, 0x00, 0x00, 0xfc, 0xff, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xf8, 0x7f, 0x00, 0x00, 0x80, 0x0f, 0x00, 0xfc, 0xf1, 0x3f, 0xfe,
0xff, 0x9f, 0xcf, 0x0f, 0x00, 0xc0, 0x37, 0x00, 0x00, 0x80, 0x0f, 0x00,
0x00, 0xc0, 0x33, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x80, 0xc3, 0x20, 0x08,
0x00, 0x8f, 0x0f, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03,
0x3c, 0x40, 0x20, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x60, 0x00,
0x00, 0x00, 0x00, 0x00 };
const unsigned char trex_gameover[] U8X8_PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xf8, 0x10, 0x22, 0x0f, 0x1c, 0x91, 0xe7, 0x01, 0x08, 0x28, 0x36, 0x01,
0x22, 0x91, 0x20, 0x02, 0x0c, 0x44, 0x2a, 0x01, 0x22, 0x91, 0x20, 0x02,
0xc4, 0x44, 0x22, 0x03, 0x22, 0x91, 0xe1, 0x01, 0x8c, 0x7c, 0x22, 0x01,
0x22, 0x9b, 0x20, 0x03, 0x98, 0x44, 0x22, 0x01, 0x22, 0x8e, 0x20, 0x02,
0xf0, 0x44, 0x22, 0x0f, 0x1c, 0x84, 0x27, 0x02, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x07, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x04, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x38, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x78, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x80, 0x38, 0x04, 0x00,
0x00, 0x80, 0x07, 0x00, 0x80, 0x18, 0x04, 0x00, 0x00, 0xa0, 0x27, 0x00,
0x80, 0x08, 0x04, 0x00, 0x00, 0xe0, 0x27, 0x00, 0x80, 0x00, 0x04, 0x00,
0x00, 0x80, 0x27, 0x00, 0x80, 0xff, 0x07, 0x00, 0x00, 0x80, 0x3f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xfc, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x80, 0x07, 0x00,
0x00, 0x00, 0x20, 0x36, 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x98, 0x0f,
0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x38, 0x2b, 0x00, 0x00, 0x00, 0x03,
0x3c, 0x00, 0x88, 0x2f, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0f,
0x00, 0x00, 0x00, 0x00 };
//=============================================================================
//---SIGNAL icons--- 12 by 12 pixels
const unsigned char noSignal[] U8X8_PROGMEM = { //13x16
0x00, 0x08, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x09, 0x80, 0x08, 0x40, 0x08,
0x20, 0x08, 0x10, 0x08, 0x08, 0x08, 0x04, 0x08, 0x02, 0x08, 0xff, 0x0f };
const unsigned char signal_20[] U8X8_PROGMEM = { //13x16
0x00, 0x08, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x09, 0x80, 0x08, 0x40, 0x08,
0x20, 0x08, 0x10, 0x08, 0x08, 0x08, 0x0c, 0x08, 0x0e, 0x08, 0xff, 0x0f };
const unsigned char signal_50[] U8X8_PROGMEM = { //13x16
0x00, 0x08, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x09, 0x80, 0x08, 0x40, 0x08,
0x60, 0x08, 0x70, 0x08, 0x78, 0x08, 0x7c, 0x08, 0x7e, 0x08, 0xff, 0x0f };
const unsigned char signal_80[] U8X8_PROGMEM = {
0x00, 0x08, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x09, 0x80, 0x09, 0xc0, 0x09,
0xe0, 0x09, 0xf0, 0x09, 0xf8, 0x09, 0xfc, 0x09, 0xfe, 0x09, 0xff, 0x0f };
const unsigned char signal_100[] U8X8_PROGMEM = {
0x00, 0x08, 0x00, 0x0c, 0x00, 0x0e, 0x00, 0x0f, 0x80, 0x0f, 0xc0, 0x0f,
0xe0, 0x0f, 0xf0, 0x0f, 0xf8, 0x0f, 0xfc, 0x0f, 0xfe, 0x0f, 0xff, 0x0f };
//=============================================================================
//---Signal ROAMING icons--- 12 by 12 pixels
const unsigned char noSignal_X[] U8X8_PROGMEM = {
0x11, 0x08, 0x0a, 0x0c, 0x04, 0x0a, 0x0a, 0x09, 0x91, 0x08, 0x40, 0x08,
0x20, 0x08, 0x10, 0x08, 0x08, 0x08, 0x04, 0x08, 0x02, 0x08, 0xff, 0x0f };;
const unsigned char signal_20_R[] U8X8_PROGMEM = {
0x0f, 0x08, 0x09, 0x0c, 0x0d, 0x0a, 0x03, 0x09, 0x85, 0x08, 0x49, 0x08,
0x20, 0x08, 0x10, 0x08, 0x08, 0x08, 0x0c, 0x08, 0x0e, 0x08, 0xff, 0x0f };
const unsigned char signal_50_R[] U8X8_PROGMEM = {
0x0f, 0x08, 0x09, 0x0c, 0x0d, 0x0a, 0x03, 0x09, 0x85, 0x08, 0x49, 0x08,
0x60, 0x08, 0x70, 0x08, 0x78, 0x08, 0x7c, 0x08, 0x7e, 0x08, 0xff, 0x0f };
const unsigned char signal_80_R[] U8X8_PROGMEM = {
0x0f, 0x08, 0x09, 0x0c, 0x0d, 0x0a, 0x03, 0x09, 0x85, 0x09, 0xc9, 0x09,
0xe0, 0x09, 0xf0, 0x09, 0xf8, 0x09, 0xfc, 0x09, 0xfe, 0x09, 0xff, 0x0f };
const unsigned char signal_100_R[] U8X8_PROGMEM = {
0x0f, 0x08, 0x09, 0x0c, 0x0d, 0x0e, 0x03, 0x0f, 0x85, 0x0f, 0xc9, 0x0f,
0xe0, 0x0f, 0xf0, 0x0f, 0xf8, 0x0f, 0xfc, 0x0f, 0xfe, 0x0f, 0xff, 0x0f };
//=============================================================================
//---Battery icons--- 9 by 12 pixels
const unsigned char battery_Broken[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0x82, 0x00, 0x82, 0x00, 0xc6, 0x00, 0xaa, 0x00,
0x92, 0x00, 0xaa, 0x00, 0xc6, 0x00, 0x82, 0x00, 0x82, 0x00, 0xfe, 0x00 };
const unsigned char battery_Charging[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0xc6, 0x00, 0x92, 0x00, 0xba, 0x00, 0x92, 0x00,
0x82, 0x00, 0x82, 0x00, 0xba, 0x00, 0x82, 0x00, 0xc6, 0x00, 0xfe, 0x00 };
const unsigned char battery_0[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00,
0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0xfe, 0x00 };
const unsigned char battery_20[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00,
0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 };
const unsigned char battery_50[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00, 0x82, 0x00,
0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 };
const unsigned char battery_80[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0x82, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00,
0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 };
const unsigned char battery_100[] U8X8_PROGMEM = {
0x38, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00,
0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xfe, 0x00 };
//=============================================================================
//--WIFI icons--- 13 by 12 pixels
const unsigned char wifi_no_acces_to_internet[] U8X8_PROGMEM = {
0xf0, 0x01, 0x0c, 0x06, 0x06, 0x0c, 0x03, 0x18, 0x01, 0x12, 0x03, 0x1a,
0x06, 0x0a, 0x0c, 0x02, 0x18, 0x02, 0xb0, 0x02, 0xe0, 0x00, 0x40, 0x02 };
const unsigned char wifi_0[] U8X8_PROGMEM = {
0xf0, 0x01, 0x0c, 0x06, 0x06, 0x0c, 0x03, 0x18, 0x01, 0x10, 0x03, 0x18,
0x06, 0x0c, 0x0c, 0x06, 0x18, 0x03, 0xb0, 0x01, 0xe0, 0x00, 0x40, 0x00 };
const unsigned char wifi_20[] U8X8_PROGMEM = {
0xf0, 0x01, 0x0c, 0x06, 0x06, 0x0c, 0x03, 0x18, 0x01, 0x10, 0x03, 0x18,
0x06, 0x0c, 0x0c, 0x06, 0xf8, 0x03, 0xf0, 0x01, 0xe0, 0x00, 0x40, 0x00 };
const unsigned char wifi_50[] U8X8_PROGMEM = {
0xf0, 0x01, 0x0c, 0x06, 0x06, 0x0c, 0x03, 0x18, 0xff, 0x1f, 0xff, 0x1f,
0xfe, 0x0f, 0xfc, 0x07, 0xf8, 0x03, 0xf0, 0x01, 0xe0, 0x00, 0x40, 0x00 };
const unsigned char wifi_80[] U8X8_PROGMEM = {
0xf0, 0x01, 0x0c, 0x06, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
0xfe, 0x0f, 0xfc, 0x07, 0xf8, 0x03, 0xf0, 0x01, 0xe0, 0x00, 0x40, 0x00 };
const unsigned char wifi_100[] U8X8_PROGMEM = {
0xf0, 0x01, 0xfc, 0x07, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
0xfe, 0x0f, 0xfc, 0x07, 0xf8, 0x03, 0xf0, 0x01, 0xe0, 0x00, 0x40, 0x00 };
//=============================================================================
//---GPS icon--- 13 by 13 pixels
const unsigned char GPS[] U8X8_PROGMEM = {
0x00, 0x00, 0x00, 0x08, 0x00, 0x0e, 0x80, 0x07, 0xe0, 0x07, 0xf8, 0x03,
0xfe, 0x03, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x00, 0xc0, 0x00, 0x40, 0x00,
0x00, 0x00 };
//---GPRS icon--- 12 by 12 pixels
const unsigned char GPRS[] U8X8_PROGMEM = {
0x03, 0x0c, 0x01, 0x08, 0xf0, 0x01, 0x18, 0x01, 0x0c, 0x00, 0x04, 0x00,
0xc4, 0x03, 0x04, 0x02, 0x08, 0x02, 0x18, 0x01, 0xe1, 0x08, 0x03, 0x0c };
//=============================================================================
//---Bluethoot icon--- 13 by 13 pixels
const unsigned char BT[] U8X8_PROGMEM = {
0x30, 0x00, 0x50, 0x00, 0x90, 0x00, 0x11, 0x01, 0x92, 0x00, 0x54, 0x00,
0x38, 0x00, 0x54, 0x00, 0x92, 0x00, 0x11, 0x01, 0x90, 0x00, 0x50, 0x00,
0x30, 0x00 };
//---bluethoot connect icon--- 12 by 12 pixels
const unsigned char BTc[] U8X8_PROGMEM = {
0x30, 0x00, 0x50, 0x00, 0x90, 0x00, 0x11, 0x01, 0x92, 0x00, 0x54, 0x00,
0x39, 0x01, 0x54, 0x00, 0x92, 0x00, 0x11, 0x01, 0x90, 0x00, 0x50, 0x00,
0x30, 0x00 };
//=============================================================================
//=============================================================================
void draw1()
{
u8g2.firstPage();
do {
u8g2.drawXBMP(119, 0, 9, 12, battery_Charging);
u8g2.drawXBMP(105, 0, 12, 12, noSignal_X);
u8g2.drawXBMP(89, 0, 13, 12, wifi_no_acces_to_internet);
u8g2.drawHLine(0, 15, 128);
u8g2.setFont(u8g2_font_haxrcorp4089_tr);
u8g2.drawStr( 0, 10,"I'm offline");
u8g2.drawXBMP(30, 25, 60, 35, trex);
} while ( u8g2.nextPage() );
} //drawOFF()
//=============================================================================
void draw2()
{
u8g2.firstPage();
do {
u8g2.drawXBMP(119, 0, 9, 12, battery_0);
u8g2.drawXBMP(105, 0, 12, 12, signal_20);
u8g2.drawXBMP(89, 0, 13, 12, wifi_20);
u8g2.drawXBMP(55, 0, 13, 12, GPS);
u8g2.drawXBMP(45, 0, 13, 12, BT);
u8g2.drawHLine(0, 15, 128);
u8g2.setFont(u8g2_font_haxrcorp4089_tr);
u8g2.drawStr( 0, 10,"I'm offline.");
u8g2.drawXBMP(30, 25, 60, 35, trex_cactus);
} while ( u8g2.nextPage() );
} //drawOFF()
//=============================================================================
void draw3()
{
u8g2.firstPage();
do {
u8g2.drawXBMP(119, 0, 9, 12, battery_20);
u8g2.drawXBMP(105, 0, 12, 12, signal_50);
u8g2.drawXBMP(89, 0, 13, 12, wifi_50);
u8g2.drawXBMP(55, 0, 13, 12, GPS);
u8g2.drawXBMP(45, 0, 13, 12, BTc);
u8g2.drawHLine(0, 15, 128);
u8g2.setFont(u8g2_font_haxrcorp4089_tr);
u8g2.drawStr( 0, 10,"I'm offline");
u8g2.drawXBMP(30, 25, 60, 35, trex_scared);
} while ( u8g2.nextPage() );
} //drawOFF()
//=============================================================================
void draw4()
{
u8g2.firstPage();
do {
u8g2.drawXBMP(119, 0, 9, 12, battery_100);
u8g2.drawXBMP(105, 0, 12, 12, signal_80_R);
u8g2.drawXBMP(89, 0, 13, 12, wifi_80);
u8g2.drawXBMP(73, 0, 13, 12, GPRS);
u8g2.drawXBMP(55, 0, 13, 12, GPS);
u8g2.drawXBMP(45, 0, 13, 12, BTc);
u8g2.drawHLine(0, 15, 128);
u8g2.setFont(u8g2_font_haxrcorp4089_tr);
u8g2.drawStr( 0, 10,"I'm online");
u8g2.drawXBMP(30, 25, 60, 35, trex_gameover);
} while ( u8g2.nextPage() );
} //drawOFF()
//=============================================================================
void setup(void) {
u8g2.begin();
}
void loop(void) {
if ((int32_t)(millis() - draw_Interval) > 1000) {
u8g2.firstPage();
do {
u8g2.drawXBMP(0, 0, 9, 12, battery_Broken);
u8g2.drawXBMP(18, 0, 9, 12, battery_Charging);
u8g2.drawXBMP(36, 0, 9, 12, battery_0);
u8g2.drawXBMP(54, 0, 9, 12, battery_20);
u8g2.drawXBMP(72, 0, 9, 12, battery_50);
u8g2.drawXBMP(90, 0, 9, 12, battery_80);
u8g2.drawXBMP(108, 0, 9, 12, battery_100);
u8g2.drawXBMP(0, 20, 12, 12, noSignal);
u8g2.drawXBMP(18, 20, 12, 12, signal_20);
u8g2.drawXBMP(36, 20, 12, 12, signal_50);
u8g2.drawXBMP(54, 20, 12, 12, signal_80);
u8g2.drawXBMP(73, 20, 12, 12, signal_100);
u8g2.drawXBMP(0, 40, 12, 12, noSignal_X);
u8g2.drawXBMP(18, 40, 12, 12, signal_20_R);
u8g2.drawXBMP(36, 40, 13, 12, signal_50_R);
u8g2.drawXBMP(54, 40, 13, 12, signal_80_R);
u8g2.drawXBMP(73, 40, 13, 12, signal_100_R);
u8g2.drawXBMP(90, 40, 13, 12, wifi_0);
u8g2.drawXBMP(108, 40, 13, 12, wifi_20);
u8g2.drawXBMP(90, 20, 13, 12, wifi_50);
u8g2.drawXBMP(108, 20, 13, 12, wifi_100);
} while ( u8g2.nextPage() );
delay(2000);
draw1();
delay(2000);
draw2();
delay(2000);
draw3();
delay(2000);
draw4();
delay(2000);
}
}
/***************************************************************************
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to permit
* persons to whom the Software is furnished to do so, subject to the
* following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
* THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
****************************************************************************
*/