#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Pro simulaci
//U8GLIB_KS0108_128 u8g(8, 9, 10, 11, 4, 5, 6, 7, 18, 15, 14, 17, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7 en=18, cs1=15, cs2=14,di=17,rw=16
// 'Home screen', 128x64px
const unsigned char epd_bitmap_Home_screen [] 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,
0x00, 0x00, 0x00, 0x07, 0x11, 0x3e, 0x38, 0x08, 0x0e, 0x1c, 0x38, 0xf9, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x91, 0x08, 0x44, 0x08, 0x11, 0x22, 0x44, 0x81, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x91, 0x08, 0x44, 0x08, 0x11, 0x20, 0x40, 0x81, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x91, 0x08, 0x44, 0x08, 0x11, 0x26, 0x4c, 0xe1, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0x91, 0x08, 0x44, 0x08, 0x11, 0x22, 0x44, 0x81, 0xe0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x91, 0x08, 0x44, 0x08, 0x11, 0x22, 0x44, 0x81, 0x20, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x08, 0x8e, 0x08, 0x38, 0x0f, 0x8e, 0x1e, 0x3c, 0xf9, 0x10, 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, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x00, 0x01, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x00, 0x00,
0x00, 0x01, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x00, 0x00,
0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
0x00, 0x00, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x00, 0x00,
0x00, 0x00, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x00, 0x00,
0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
0x00, 0x00, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x40, 0x00, 0x00,
0x00, 0x00, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x40, 0x00, 0x00,
0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x10, 0x41, 0x04, 0x10, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x82, 0x08, 0x20, 0x82, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x41, 0x04, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x10, 0x41, 0x04, 0x10, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x20, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x08, 0x20, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x41, 0x04, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x08, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// '8x1', 128x64px
const unsigned char epd_bitmap_8x1 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x02, 0x02,
0x40, 0x20, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x06, 0x02,
0x40, 0x24, 0x8e, 0x3c, 0x78, 0x71, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x48, 0x8a, 0x02,
0x40, 0x24, 0x91, 0x22, 0x44, 0x89, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x85, 0x02, 0x02,
0x40, 0x24, 0x9f, 0x22, 0x44, 0xf9, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x42, 0x02, 0x02,
0x40, 0x24, 0x90, 0x22, 0x44, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x45, 0x02, 0x02,
0x40, 0x1b, 0x0e, 0x22, 0x44, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x88, 0x82, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x1c, 0x00, 0x80, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x22, 0x00, 0x80, 0x80, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x20, 0x38, 0xf0, 0x88, 0x9d, 0x8f, 0x0e, 0x26, 0x3c, 0x71, 0x30, 0x00, 0x00, 0x00, 0x02,
0x40, 0x1c, 0x44, 0x88, 0x88, 0x92, 0x48, 0x91, 0x28, 0x44, 0x89, 0x40, 0x00, 0x00, 0x00, 0x02,
0x40, 0x02, 0x40, 0x88, 0x88, 0x92, 0x48, 0x9f, 0x30, 0x44, 0xf9, 0x80, 0x00, 0x00, 0x00, 0x02,
0x40, 0x22, 0x44, 0x88, 0x88, 0x90, 0x48, 0x90, 0x20, 0x3c, 0x81, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x1c, 0x38, 0x88, 0x47, 0x10, 0x4f, 0x0e, 0x20, 0x04, 0x71, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x7c, 0x07, 0x01, 0xf0, 0x06, 0x03, 0x80, 0x70, 0x02, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x20, 0x04, 0x08, 0x81, 0x00, 0x0a, 0x04, 0x40, 0x88, 0x06, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x20, 0x08, 0x08, 0x01, 0xe0, 0x12, 0x00, 0x40, 0x08, 0x0a, 0x02,
0x40, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x10, 0x0f, 0x00, 0x10, 0x22, 0x01, 0x80, 0x10, 0x02, 0x02,
0x40, 0x1f, 0xff, 0xf0, 0x02, 0x20, 0x20, 0x08, 0x80, 0x10, 0x3e, 0x00, 0x40, 0x20, 0x02, 0x02,
0x40, 0x20, 0x00, 0x30, 0x02, 0x20, 0x40, 0x08, 0x81, 0x10, 0x02, 0x04, 0x40, 0x40, 0x02, 0x02,
0x40, 0x40, 0x00, 0x50, 0x01, 0xc0, 0x40, 0x07, 0x00, 0xe0, 0x02, 0x03, 0x80, 0xf8, 0x02, 0x02,
0x40, 0xff, 0xff, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x80, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x9f, 0xfc, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xa0, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xa3, 0x82, 0x80, 0x01, 0xc0, 0x38, 0x07, 0x00, 0xe0, 0x1c, 0x03, 0x80, 0x70, 0x0e, 0x02,
0x40, 0xa2, 0x42, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x02,
0x40, 0xa2, 0x42, 0x80, 0x01, 0xc0, 0x38, 0x07, 0x00, 0xe0, 0x1c, 0x03, 0x80, 0x70, 0x0e, 0x02,
0x40, 0xa2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xa2, 0x42, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xa3, 0x82, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xa0, 0x02, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x9f, 0xfc, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x80, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// '1x16', 128x64px
const unsigned char epd_bitmap_1x16 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x21, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x62, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x88, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x50, 0x23, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x20, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x50, 0x22, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x88, 0x21, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x20, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x02,
0x40, 0x60, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x03, 0x11, 0x02,
0x40, 0xa0, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x05, 0x10, 0x02,
0x40, 0x20, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x02,
0x40, 0x20, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x11, 0x02,
0x40, 0x20, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x01, 0x11, 0x02,
0x40, 0x20, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x70, 0x0e, 0x00, 0x0e, 0x01, 0xc0, 0x00, 0x00, 0x38, 0x07, 0x00, 0x07, 0x00, 0xe0, 0x02,
0x40, 0x7f, 0xff, 0xd5, 0x7f, 0xff, 0xf0, 0x00, 0x00, 0xff, 0xff, 0xea, 0xbf, 0xff, 0xe0, 0x02,
0x40, 0x70, 0x0e, 0x00, 0x0e, 0x01, 0xc8, 0x00, 0x01, 0x38, 0x07, 0x00, 0x07, 0x00, 0xe0, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4f, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x20, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xff, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x70, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x48, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x70, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0xff, 0x94, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// '4x4', 128x64px
const unsigned char epd_bitmap_4x4 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x02,
0x40, 0x03, 0x00, 0x0c, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x02,
0x40, 0x05, 0x00, 0x14, 0x00, 0x02, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe3, 0xe0, 0x00, 0x02,
0x40, 0x09, 0x22, 0x24, 0x00, 0x02, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x20, 0x00, 0x02,
0x40, 0x11, 0x14, 0x44, 0x00, 0x02, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe0, 0x20, 0x00, 0x02,
0x40, 0x1f, 0x08, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x01, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x01, 0x22, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xf8, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x02,
0x40, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe0, 0xf0, 0x00, 0x02,
0x40, 0x00, 0x20, 0x00, 0x30, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x02,
0x40, 0x00, 0x40, 0x00, 0x50, 0x80, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe0, 0x08, 0x00, 0x02,
0x40, 0x00, 0xff, 0xff, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x02,
0x40, 0x00, 0x80, 0x00, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x02,
0x40, 0x00, 0x9f, 0xfc, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa0, 0x02, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa3, 0x82, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa2, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa2, 0x42, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa2, 0x42, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa2, 0x42, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa3, 0x82, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x40, 0x00, 0xa0, 0x02, 0x92, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x02,
0x40, 0x00, 0x9f, 0xfc, 0xa1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x11, 0x00, 0x02,
0x40, 0x00, 0x80, 0x00, 0xc0, 0x80, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe5, 0x01, 0x00, 0x02,
0x40, 0x00, 0xff, 0xff, 0x80, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x02, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe1, 0x04, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x08, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x1f, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe0, 0x87, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x06, 0x22, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe1, 0x88, 0x80, 0x02,
0x40, 0x00, 0x00, 0x00, 0x0a, 0x20, 0x1c, 0x00, 0x38, 0x00, 0x70, 0x00, 0xe2, 0x80, 0x80, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x83, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x80, 0x02,
0x40, 0x00, 0x00, 0x00, 0x02, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x02,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const unsigned char* bitmaps[4] = {
epd_bitmap_Home_screen,
epd_bitmap_8x1,
epd_bitmap_1x16,
epd_bitmap_4x4
};
byte combination16[56] = {
0b10111111, //C2 8_1_1
0b01111111, //C1 8_1_1
0b11011111, //C2 8_1_2
0b10111111, //C1 8_1_2
0b11101111, //C2 8_1_3
0b11011111, //C1 8_1_3
0b11110111, //C2 8_1_4
0b11101111, //C1 8_1_4
0b11111011, //C2 8_1_5
0b11110111, //C1 8_1_5
0b11111101, //C2 8_1_6
0b11111011, //C1 8_1_6
0b11111110, //C2 8_1_7
0b11111101, //C1 8_1_7
//____________________________
0b11011111, //C2 8_1_7
0b01111111, //C1 8_1_7
0b11101111, //C2 8_1_7
0b10111111, //C1 8_1_7
0b11110111, //C2 8_1_7
0b11011111, //C1 8_1_7
0b11111011, //C2 8_1_7
0b11101111, //C1 8_1_7
0b11111101, //C2 8_1_7
0b11110111, //C1 8_1_7
0b11111110, //C2 8_1_7
0b11111011, //C1 8_1_7
//____________________________
0b11101111,
0b01111111,
0b11110111,
0b10111111,
0b11111011,
0b11011111,
0b11111101,
0b11110111,
0b11111110,
0b11111011,
//____________________________
0b11110111,
0b01111111,
0b11111011,
0b10111111,
0b11111101,
0b11011111,
0b11111110,
0b11101111,
//____________________________
0b11111011,
0b01111111,
0b11111101,
0b10111111,
0b11111110,
0b11011111,
//____________________________
0b11111101,
0b01111111,
0b11111110,
0b10111111,
//____________________________
0b11111110,
0b01111111,
};
// Define menu states
enum MenuState {
HOME_SCREEN,
SCREEN_1x8,
SCREEN_1x16,
SCREEN_4x4,
SCANNING_IN_PROGRESS,
START_SCANNING,
CANCEL_SCANNING,
SCANNING_COMPLETE,
SCANNING_CANCELED
};
// Rotary Encoder pins
#define ENCODER_CLK 2 //CLK
#define ENCODER_BTN 3 //SW
#define ENCODER_DT 12 //DT
// 74HC595 control pins
#define LATCH_PIN 19 // STCP Latch pin of 74HC595 is connected to Digital pin 5
#define CLOCK_PIN 22 // SHCP Clock pin of 74HC595 is connected to Digital pin 6
#define DATA_PIN 23 // DS Data pin of 74HC595 is connected to Digital pin 4
#define COMBINATION_HOLD_TIME 1000 //Duration of the each combiantion (Adjust accordingly)
#define CLEAR_OUTPUT_HOLD_TIME 100 //Clearing the output and hold if for certain amount of time (Adjust accordingly)
int menu = 0;
int encoderPos = 0;
bool buttonPress = false;
bool lStart = true;
bool rStart = true;
bool cancelScreen = false;
bool cancelYN = false;
void setup(void) {
// Rotary Encoder setup
pinMode(ENCODER_CLK, INPUT);
pinMode(ENCODER_DT, INPUT);
pinMode(ENCODER_BTN, INPUT_PULLUP);
// 74HC595 setup
pinMode(LATCH_PIN, OUTPUT);
pinMode(DATA_PIN, OUTPUT);
pinMode(CLOCK_PIN, OUTPUT);
attachInterrupt(digitalPinToInterrupt(ENCODER_CLK), readEncoder, FALLING);
attachInterrupt(digitalPinToInterrupt(ENCODER_BTN), pressButton, RISING);
clearOutput();
//Serial.begin(9600); // or the baud rate you are using
}
void loop(void) {
switch (menu) {
case 0: //Home screen LOGO
displayPrint();
startMenu(); //Limits the rotation of CCV
buttonPress = false;
break;
case 1: // 1x8 Screen
displayPrint();
changeMenu();
if(buttonPress) {
menu = 11;
buttonPress = false;
}
break;
case 2: // 1x16 Screen
displayPrint();
changeMenu();
buttonPress = false;
break;
case 3: //
displayPrint();
endMenu();
buttonPress = false;
break;
case 11: //Selected No
if(encoderPos > 0) {
menu = 12;
encoderPos = 0;
}
else {
encoderPos = 0;
}
scanConfirm(menu);
if (buttonPress) {
buttonPress = false;
menu = 1;
}
break;
case 12: //Selected Yes
if(encoderPos < 0) {
menu = 11;
encoderPos = 0;
}
else {
encoderPos = 0;
}
scanConfirm(menu);
if (buttonPress) {
menu = 121;
buttonPress = false;
}
break;
case 121: //Scanning in progress!
if (buttonPress == true || cancelScreen == true) {
buttonPress = false;
cancelScreen = true;
scanCancel(cancelYN);
if (encoderPos < 0) {
cancelYN = false;
encoderPos = 0;
}
else if (encoderPos > 0) {
cancelYN = true;
encoderPos = 0;
}
else {
encoderPos = 0;
}
if (cancelYN == false && buttonPress) {
buttonPress = false;
cancelScreen = false;
}
else if (cancelYN == true && buttonPress) { // Confirm canceling
cancelYN = false;
cancelScreen = false;
buttonPress = false;
lStart = true; // Allows the function loadingFunc to be called again, from the beginning
rStart = true; // Restarts the function updateShiftRegisterMillis and her parameters
menu = 1212;
}
}
else {
scanBar(loadingFunc());
}
if (updateShiftRegisterMillis()) {
menu = 1211; // Go to screen (Scanning is completed)
lStart = true; // Allows the function loadingFunc to be called again, from the beginning
}
break;
case 1211: //Scanning is complete!
scanComplete();
delay(2000);
menu = 0;
encoderPos = 0;
buttonPress = false;
break;
case 1212: //Scanning is canceled!
scanCanceled();
delay(2000);
menu = 0;
encoderPos = 0;
buttonPress = false;
clearOutput();
break;
/*default:
if nothing else matches, do the default
default is optional
break;*/
}
//Serial.println("loop");
}
//-------------------------------------------------------------Functions
bool updateShiftRegisterMillis() {
static unsigned long previousMillis1;
static unsigned long currentMillis1;
static unsigned long previousMillis2;
static unsigned long currentMillis2;
static bool combOut;
static bool delayOut;
static int l;
if(rStart == true) {
previousMillis1 = millis();
previousMillis2 = millis();
combOut = false;
delayOut = true;
l = 0;
rStart = false;
}
if(l < sizeof(combination16)/2) {
currentMillis1 = millis();
if(currentMillis1 - previousMillis1 >= COMBINATION_HOLD_TIME && combOut == true) {
clearOutput();
combOut = false;
delayOut = true;
previousMillis2 = currentMillis2;
l++;
}
currentMillis2 = millis();
if(currentMillis2 - previousMillis2 >= CLEAR_OUTPUT_HOLD_TIME && delayOut == true && l <= sizeof(combination16)/2) {
digitalWrite(LATCH_PIN, LOW);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 255);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 255);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, combination16[l*2]);
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, combination16[(l*2) + 1]);
digitalWrite(LATCH_PIN, HIGH);
//Serial.println("ShiftOut");
combOut = true;
delayOut = false;
previousMillis1 = currentMillis1;
}
return false;
}
else {
//Clears the output when the procedure is finished
clearOutput();
rStart = true;
return true;
}
}
void clearOutput() { //Puts all outputs of the shift registers to 0
digitalWrite(LATCH_PIN, LOW);
for(int i = 0; i < 4; i++) {
shiftOut(DATA_PIN, CLOCK_PIN, LSBFIRST, 255);
}
digitalWrite(LATCH_PIN, HIGH);
}
int loadingFunc() { // Function that calculates loading bar lenght
static unsigned long previousMillis3;
static unsigned long currentMillis3;
static float combDuration;
if(lStart == true) {
previousMillis3 = millis();
lStart = false; // Allows the true block of if statement ot be executed only the fist time
combDuration = (COMBINATION_HOLD_TIME + CLEAR_OUTPUT_HOLD_TIME) * (sizeof(combination16)/2);
return 0;
}
else {
currentMillis3 = millis();
return int(float(float(currentMillis3 - previousMillis3)/combDuration)*100);
}
}
void changeMenu() { // Increase or decrease the value of menu while returning the encoder position to 0
if(encoderPos > 0) {
menu ++;
encoderPos = 0;
}
if(encoderPos < 0) {
menu --;
encoderPos = 0;
}
}
void startMenu() {
if(encoderPos > 0) {
menu ++;
encoderPos = 0;
}
else{
encoderPos = 0;
}
}
void endMenu() {
if(encoderPos < 0) {
menu --;
encoderPos = 0;
}
else{
encoderPos = 0;
}
}
void scanComplete() { //Scanning is completed! screen
u8g.firstPage();
do {
u8g.drawRFrame(1, 1, 126, 62, 3);
u8g.setFont(u8g_font_6x10);
u8g.drawStr(30, 30, "Scanning is");
u8g.drawStr(35, 40, "completed!");
} while (u8g.nextPage());
}
void scanCanceled() { //Scanning is canceled! screen
u8g.firstPage();
do {
u8g.drawRFrame(1, 1, 126, 62, 3);
u8g.setFont(u8g_font_6x10);
u8g.drawStr(30, 30, "Scanning is");
u8g.drawStr(35, 40, "canceled!");
} while (u8g.nextPage());
}
void scanBar(int progressX) { // Scanning in process!
u8g.firstPage();
do {
u8g.drawRFrame(1, 1, 126, 62, 3);
u8g.setFont(u8g_font_6x10);
u8g.drawStr(30, 15, "Scanning in");
u8g.drawStr(38, 25, "progress!");
u8g.drawStr(55, 40, (String(progressX) + "%").c_str());
u8g.drawFrame(14,45,101,10);
u8g.drawBox(15,45,progressX,10);
} while (u8g.nextPage());
}
void scanConfirm(int y_n) { // Beginning of scanning confirmation screen
u8g.firstPage();
do {
u8g.drawRFrame(1, 1, 126, 62, 3);
u8g.setFont(u8g_font_6x10);
u8g.drawStr(22, 15, "Do you want to");
u8g.drawStr(20, 30, "start scanning?");
if(y_n == 12) {
//Selected Yes
u8g.drawBox(80,40,24,13);
u8g.setColorIndex(0);
u8g.drawStr(83, 50, "Yes");
u8g.setColorIndex(1);
u8g.drawFrame(25,40,24,13);
u8g.drawStr(31, 50, "No");
}
else{
//Selected No
u8g.drawBox(25,40,24,13);
u8g.setColorIndex(0);
u8g.drawStr(31, 50, "No");
u8g.setColorIndex(1);
u8g.drawFrame(80,40,24,13);
u8g.drawStr(83, 50, "Yes");
}
} while (u8g.nextPage());
}
void scanCancel(bool y_n) { // Cancel Scanning screen
u8g.firstPage();
do {
u8g.drawRFrame(1, 1, 126, 62, 3);
u8g.setFont(u8g_font_6x10);
u8g.drawStr(22, 15, "Do you want to");
u8g.drawStr(20, 30, "cancel scanning?");
if(y_n == true) {
//Selected Yes
u8g.drawBox(80,40,24,13);
u8g.setColorIndex(0);
u8g.drawStr(83, 50, "Yes");
u8g.setColorIndex(1);
u8g.drawFrame(25,40,24,13);
u8g.drawStr(31, 50, "No");
}
else{
//Selected No
u8g.drawBox(25,40,24,13);
u8g.setColorIndex(0);
u8g.drawStr(31, 50, "No");
u8g.setColorIndex(1);
u8g.drawFrame(80,40,24,13);
u8g.drawStr(83, 50, "Yes");
}
} while (u8g.nextPage());
}
void displayPrint() { // Bitmap displaying function
u8g.firstPage();
do {
u8g.drawBitmapP(0, 0, 128/8, 64, bitmaps[menu]);
} while (u8g.nextPage());
}
void pressButton() {
buttonPress = true;
}
void readEncoder() {
static int dtValue;
dtValue = digitalRead(ENCODER_DT);
if (dtValue == HIGH) {
encoderPos ++;
}
if (dtValue == LOW) {
encoderPos --;
}
}
void encoderRead() {
static int lastClk;
static int newClk;
static int dtValue;
newClk = digitalRead(ENCODER_CLK);
if (newClk != lastClk) {
// There was a change on the CLK pin
lastClk = newClk;
dtValue = digitalRead(ENCODER_DT);
if (newClk == LOW && dtValue == HIGH) {
//Serial.println("Rotated clockwise ⏩");
encoderPos ++;
}
if (newClk == LOW && dtValue == LOW) {
//Serial.println("Rotated counterclockwise ⏪");
encoderPos --;
}
}
}