#include "U8glib.h"
#define b_up A1
#define b_anter A2
#define b_down A3
#define buzzer 5
#define wheel_1A 2
#define wheel_1B 3
#define wheel_2A 4
#define wheel_2B 8
#define pinR 11
#define pinG 9
#define pinB 10
//detector
const int triggerPin = 7;
const int echoPin = 6;
float TotalT= 0 ;
float Speed = 0.000343; // m/us
float Distance =0 ;
int b_up_clicked = 0; // only perform action when button is clicked, and wait until another press
int b_anter_clicked = 0;
int b_down_clicked = 0;
int current_screen = 0; //0 menu, 1 inside, 2(out?)
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST | U8G_I2C_OPT_NONE); // Fast I2C / TWI
//////////////////////////////////////////////////images//////////////////////////////////////////////////////////////
////////////////// icons:
// ' sign up', 16x16px
const unsigned char epd_bitmap_sign_up [] PROGMEM = {
0x00, 0x00, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x7f, 0xfe,
0x7f, 0xfe, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00
};
// 'about', 16x16px
const unsigned char epd_bitmap_about [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x10, 0x02, 0x08, 0x02, 0x08, 0x02, 0x08, 0x03, 0x10,
0x07, 0xe0, 0x0e, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'formation', 16x16px
const unsigned char epd_bitmap_formation [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x08, 0xe0, 0x10, 0x1e, 0x20, 0xac, 0x70, 0x0a, 0x1e, 0x18,
0x11, 0xea, 0x10, 0x08, 0x10, 0x0a, 0x18, 0x08, 0x07, 0xf2, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00
};
// 'sign in', 16x16px
const unsigned char epd_bitmap_sign_in [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x04, 0x40, 0x08, 0x20, 0x08, 0x20, 0x08, 0x20, 0x04, 0x40,
0x03, 0x80, 0x04, 0x40, 0x08, 0x20, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00
};
const unsigned char* epd_bitmap_icons[4] = {
epd_bitmap_about,
epd_bitmap_formation,
epd_bitmap_sign_up,
epd_bitmap_sign_in
};
/////////////////// 'selection', 128x21px
const unsigned char epd_bitmap_selection [] PROGMEM = {
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf8
};
/////////////////////screenshot
// 'about centre screenshot', 128x64px
const unsigned char epd_bitmap_about_center [] PROGMEM = {
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x20, 0x60, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x30, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0c, 0x03, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00,
0x08, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x00,
0x18, 0x61, 0x8c, 0x7c, 0x7c, 0x3c, 0x66, 0x3c, 0x7c, 0x61, 0xe3, 0xe0, 0x3e, 0x33, 0x3e, 0x00,
0x18, 0x61, 0x8c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x30, 0x63, 0x33, 0x30, 0x33, 0x33, 0x33, 0x00,
0x18, 0x01, 0x8c, 0x66, 0x66, 0x66, 0x66, 0x06, 0x30, 0x63, 0x33, 0x30, 0x33, 0x33, 0x33, 0x00,
0x08, 0x63, 0x0c, 0x66, 0x66, 0x66, 0x66, 0x3e, 0x30, 0x63, 0x33, 0x30, 0x33, 0x33, 0x33, 0x00,
0x08, 0x63, 0x0c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x30, 0x63, 0x33, 0x30, 0x33, 0x33, 0x33, 0x00,
0x0c, 0x26, 0x0c, 0x66, 0x66, 0x66, 0x3c, 0x66, 0x30, 0x63, 0x33, 0x30, 0x33, 0x33, 0x33, 0x00,
0x06, 0x3e, 0x0c, 0x66, 0x66, 0x3c, 0x18, 0x3e, 0x1c, 0x61, 0xe3, 0x30, 0x33, 0x1e, 0x3e, 0x00,
0x02, 0x18, 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, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x40, 0x20, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf0, 0x00, 0x0f, 0xa1, 0x7c, 0x79, 0xf2, 0x78, 0x0f, 0x97, 0x1e, 0x5f, 0x2f, 0x8f, 0x00,
0x00, 0x00, 0x00, 0x10, 0xa1, 0x42, 0x05, 0x4a, 0x84, 0x08, 0x18, 0x81, 0x50, 0xa8, 0x50, 0x80,
0x00, 0xf0, 0x00, 0x10, 0xa1, 0x42, 0x7d, 0x4a, 0x80, 0x08, 0x10, 0x1f, 0x50, 0xa8, 0x50, 0x80,
0x00, 0x60, 0x00, 0x10, 0xa1, 0x42, 0x85, 0x4a, 0x84, 0x08, 0x50, 0x21, 0x50, 0xa8, 0x50, 0x80,
0x00, 0x00, 0x00, 0x0f, 0x9f, 0x42, 0x7d, 0x4a, 0x78, 0x07, 0x90, 0x1f, 0x50, 0xa8, 0x4f, 0x80,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80,
0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x1e, 0x3c, 0xf9, 0xf1, 0xe5, 0xc0, 0x08, 0x57, 0xc7, 0x97, 0x1e, 0x7c, 0xf8, 0x07, 0x8f, 0x00,
0x21, 0x42, 0x85, 0x02, 0x16, 0x20, 0x08, 0x54, 0x28, 0x58, 0xa1, 0x42, 0x80, 0x08, 0x50, 0xbe,
0x20, 0x7c, 0x85, 0x03, 0xe4, 0x00, 0x04, 0x54, 0x2f, 0x90, 0x3e, 0x42, 0x80, 0x08, 0x10, 0x80,
0x21, 0x40, 0x85, 0x0a, 0x04, 0x04, 0x02, 0x54, 0x28, 0x10, 0x20, 0x42, 0x84, 0x08, 0x50, 0x80,
0x1e, 0x3c, 0x84, 0xf1, 0xe4, 0x04, 0x01, 0xd7, 0xc7, 0x90, 0x1e, 0x42, 0x78, 0x07, 0x8f, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x02, 0x00, 0x00,
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00,
0x29, 0x3c, 0xb9, 0x0a, 0xf8, 0xf0, 0x0f, 0x3e, 0x3c, 0x78, 0xf0, 0x02, 0x95, 0xf3, 0xe0, 0x00,
0x29, 0x42, 0xc5, 0x0a, 0x85, 0x08, 0x10, 0x21, 0x02, 0x85, 0x08, 0x02, 0x95, 0x02, 0x10, 0x00,
0x29, 0x42, 0x81, 0xf2, 0x85, 0x08, 0x0f, 0x21, 0x3e, 0x81, 0xf0, 0x02, 0x95, 0x02, 0x10, 0x00,
0x29, 0x42, 0x81, 0x0a, 0x85, 0x08, 0x00, 0xa1, 0x42, 0x85, 0x01, 0x02, 0x95, 0x0a, 0x10, 0x00,
0x1e, 0x3c, 0x81, 0x0a, 0x84, 0xf8, 0x0f, 0x3e, 0x3e, 0x78, 0xf1, 0x01, 0xe4, 0xf2, 0x10, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x40, 0x28, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x08, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0x4f, 0x2f, 0x8f, 0x20, 0x3e, 0x5c, 0x78, 0xf1, 0xe7, 0xc7, 0x8f, 0x00, 0x00, 0x00, 0x00,
0x21, 0x50, 0xa8, 0x00, 0xa0, 0x21, 0x62, 0x85, 0x02, 0x14, 0x28, 0x50, 0x80, 0x00, 0x00, 0x00,
0x21, 0x50, 0xa8, 0x0f, 0xa0, 0x21, 0x40, 0xf8, 0xf3, 0xe4, 0x28, 0x1f, 0x00, 0x00, 0x00, 0x00,
0x21, 0x50, 0xa8, 0x50, 0xa0, 0x21, 0x40, 0x80, 0x0a, 0x04, 0x28, 0x50, 0x00, 0x00, 0x00, 0x00,
0x1f, 0x4f, 0xa7, 0x8f, 0x90, 0x3e, 0x40, 0x78, 0xf1, 0xe4, 0x27, 0x8f, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x80, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x00, 0x00, 0x00, 0x20, 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
};
const unsigned char epd_bitmap_scanning [] 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x42, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x7c, 0x85, 0xf0, 0x10, 0x9e, 0x42, 0xb8, 0x0e, 0x5f, 0x1e, 0x3c, 0xb8, 0x07, 0x9f, 0x00,
0x00, 0x40, 0x85, 0x00, 0x10, 0xa1, 0x42, 0xc4, 0x08, 0x50, 0xa1, 0x42, 0xc4, 0x08, 0x50, 0x80,
0x00, 0x40, 0x85, 0x00, 0x10, 0xa1, 0x42, 0x80, 0x08, 0x50, 0xa1, 0x7c, 0x80, 0x08, 0x50, 0x80,
0x00, 0x40, 0x85, 0x08, 0x10, 0xa1, 0x42, 0x80, 0x08, 0x50, 0xa1, 0x40, 0x80, 0x08, 0x50, 0x80,
0x00, 0x40, 0x7c, 0xf0, 0x0f, 0x9e, 0x3e, 0x80, 0x08, 0x50, 0x9f, 0x3c, 0x80, 0x07, 0x90, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 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, 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, 0x10, 0x20, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x20, 0x00, 0x04, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x20, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1f, 0x3e, 0x3c, 0x07, 0x2f, 0x8f, 0x1e, 0x5c, 0xf9, 0x72, 0xf9, 0xf0, 0x00, 0x00,
0x00, 0x00, 0x10, 0x21, 0x42, 0x04, 0x28, 0x50, 0xa1, 0x62, 0x85, 0x8a, 0x85, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0x21, 0x7c, 0x04, 0x28, 0x50, 0xbe, 0x40, 0x85, 0x02, 0x85, 0x00, 0x00, 0x00,
0x00, 0x00, 0x10, 0xa1, 0x40, 0x04, 0x28, 0x50, 0xa0, 0x40, 0x85, 0x02, 0x85, 0x08, 0x00, 0x00,
0x00, 0x00, 0x0f, 0x21, 0x3c, 0x04, 0x28, 0x4f, 0x9e, 0x40, 0xf9, 0x02, 0x84, 0xf0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x80, 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, 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, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x01, 0xe3, 0xcf, 0x8f, 0x1e, 0x5c, 0x07, 0xc7, 0x80, 0x78, 0xf1, 0xe7, 0xc0, 0x00, 0x00,
0x00, 0x02, 0x04, 0x28, 0x50, 0x21, 0x62, 0x04, 0x08, 0x40, 0x81, 0x08, 0x14, 0x20, 0x00, 0x00,
0x00, 0x01, 0xe7, 0xc8, 0x4f, 0x21, 0x40, 0x04, 0x08, 0x40, 0x79, 0x01, 0xf4, 0x20, 0x00, 0x00,
0x00, 0x00, 0x14, 0x08, 0x40, 0xa1, 0x40, 0x04, 0x28, 0x40, 0x05, 0x0a, 0x14, 0x2a, 0xa0, 0x00,
0x00, 0x01, 0xe3, 0xc8, 0x4f, 0x1e, 0x40, 0x03, 0xc7, 0x80, 0x78, 0xf1, 0xf4, 0x2a, 0xa0, 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, 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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
////second screen of formation
// 'ones at the moment', 128x9px
const unsigned char epd_bitmap_ones_at_the_moment_1 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40,
0x79, 0xf1, 0xe3, 0xc0, 0x3c, 0xf8, 0x0f, 0x9f, 0x1e, 0x03, 0xe3, 0xcf, 0x8f, 0x3e, 0x7c, 0x40,
0x85, 0x0a, 0x14, 0x00, 0x02, 0x80, 0x08, 0x10, 0xa1, 0x02, 0x94, 0x2a, 0x50, 0xa1, 0x40, 0x00,
0x85, 0x0b, 0xe3, 0xc0, 0x3e, 0x80, 0x08, 0x10, 0xbe, 0x02, 0x94, 0x2a, 0x5f, 0x21, 0x40, 0x00,
0x85, 0x0a, 0x00, 0x20, 0x42, 0x84, 0x08, 0x50, 0xa0, 0x02, 0x94, 0x2a, 0x50, 0x21, 0x42, 0x40,
0x79, 0x09, 0xe3, 0xc0, 0x3e, 0x78, 0x07, 0x90, 0x9e, 0x02, 0x93, 0xca, 0x4f, 0x21, 0x3c, 0x40,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'selection 2', 128x17px
// 'ones at the moment', 128x64px
const unsigned char epd_bitmap_ones_at_the_moment [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40,
0x79, 0xf1, 0xe3, 0xc0, 0x3c, 0xf8, 0x0f, 0x9f, 0x1e, 0x03, 0xe3, 0xcf, 0x8f, 0x3e, 0x7c, 0x40,
0x85, 0x0a, 0x14, 0x00, 0x02, 0x80, 0x08, 0x10, 0xa1, 0x02, 0x94, 0x2a, 0x50, 0xa1, 0x40, 0x00,
0x85, 0x0b, 0xe3, 0xc0, 0x3e, 0x80, 0x08, 0x10, 0xbe, 0x02, 0x94, 0x2a, 0x5f, 0x21, 0x40, 0x00,
0x85, 0x0a, 0x00, 0x20, 0x42, 0x84, 0x08, 0x50, 0xa0, 0x02, 0x94, 0x2a, 0x50, 0x21, 0x42, 0x40,
0x79, 0x09, 0xe3, 0xc0, 0x3e, 0x78, 0x07, 0x90, 0x9e, 0x02, 0x93, 0xca, 0x4f, 0x21, 0x3c, 0x40,
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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'selection 2', 128x17px
const unsigned char epd_bitmap_selection_2 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 288)
const int epd_bitmap_allArray_LEN = 1;
const unsigned char* epd_bitmap_allArray[1] = {
epd_bitmap_selection_2
};
const unsigned char* bitmap_screenshots [4] = {
epd_bitmap_about_center,
epd_bitmap_ones_at_the_moment,
epd_bitmap_scanning,
epd_bitmap_scanning
};
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//screen 1
const int NUM_item = 4;
char menu_items[NUM_item][20]{
{"About our center"},
{"Our formations"},
{"Sign up"},
{"Sign in"}
};
int selected =0;
int previous;
int next;
//screen 2
const int NUM_item_ = 3;
char menu_items_[NUM_item_][20]{
{"Public speaking R3"},
{"Data analysis R5"},
{"Eng discussion R2"}
};
int selected_ =0;
int previous_;
int next_;
char R3;
char R5;
char R2;
const unsigned char* rooms [3] = {
R3,
R5,
R2
};
void setup() {
pinMode(b_up, INPUT_PULLUP);
pinMode(b_down, INPUT_PULLUP);
pinMode(b_anter, INPUT_PULLUP);
pinMode(triggerPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(pinR, OUTPUT);
pinMode(pinG, OUTPUT);
pinMode(pinB, OUTPUT);
pinMode(wheel_1A, OUTPUT);
pinMode(wheel_1B, OUTPUT);
pinMode(wheel_2A, OUTPUT);
pinMode(wheel_2B, OUTPUT);
}
void loop() {
digitalWrite(triggerPin, LOW);
delayMicroseconds(2);
digitalWrite(triggerPin, HIGH);
delayMicroseconds(10);
digitalWrite(triggerPin, LOW);
TotalT = pulseIn(echoPin, HIGH);
Distance = (TotalT * Speed) / 2;
if (Distance <= 1){
u8g.setFont(u8g_font_tpssb);
u8g.setColorIndex(1);
if(current_screen == 0){
if(digitalRead(b_up) == LOW && (b_up_clicked == 0)){
tone(buzzer, 660, 20);
selected = selected - 1;
b_up_clicked = 1;
if (selected < 0){
selected = NUM_item -1;
}
}
if(digitalRead(b_down) == LOW && (b_down_clicked == 0)){
tone(buzzer, 600, 20);
selected = selected + 1;
b_down_clicked = 1;
if (selected >= NUM_item){
selected = 0;
}
}
previous = selected - 1;
if (previous < 0){previous = NUM_item -1;} //turn to the last
next = selected + 1;
if (next >= NUM_item){next = 0;} //turn to the first
if ((digitalRead(b_up) == HIGH) && (b_up_clicked == 1)) { // unclick
b_up_clicked = 0;
}
if ((digitalRead(b_down) == HIGH) && (b_down_clicked == 1)) { // unclick
b_down_clicked = 0;
}
}
if(current_screen == 1){
if(digitalRead(b_up) == LOW && (b_up_clicked == 0)){
tone(buzzer, 660, 20);
selected_ = selected_ - 1;
b_up_clicked = 1;
if (selected_ < 0){
selected_ = NUM_item_ -1;
}
}
if(digitalRead(b_down) == LOW && (b_down_clicked == 0)){
tone(buzzer, 600, 20);
selected_ = selected_ + 1;
b_down_clicked = 1;
if (selected_ >= NUM_item_){
selected_ = 0;
}
}
previous_ = selected_ - 1;
if (previous_ < 0){previous_ = NUM_item_ -1;} //turn to the last
next_ = selected_ + 1;
if (next_ >= NUM_item_){next_ = 0;} //turn to the first
if ((digitalRead(b_up) == HIGH) && (b_up_clicked == 1)) { // unclick
b_up_clicked = 0;
}
if ((digitalRead(b_down) == HIGH) && (b_down_clicked == 1)) { // unclick
b_down_clicked = 0;
}
}
if ((digitalRead(b_anter) == LOW) && (b_anter_clicked == 0)) { // select button clicked, jump between screens
tone(buzzer, 523, 60);
tone(buzzer, 659, 40);
tone(buzzer, 900, 40);
b_anter_clicked = 1; // set button to clicked to only perform the action once
if (current_screen == 0) {current_screen = 1;} // menu items screen --> screenshots screen
else if (current_screen == 1 && bitmap_screenshots[selected] == epd_bitmap_ones_at_the_moment) {current_screen = 2;} // screenshots screen --> home with it being formation
else {current_screen = 0 ;} // --> menu items screen
}
if ((digitalRead(b_anter) == HIGH) && (b_anter_clicked == 1)) { // unclick
b_anter_clicked = 0;
}
u8g.firstPage();
do {
if (current_screen == 0) {
//previous
analogWrite(pinG, 0);
analogWrite(pinR, 255);
analogWrite(pinB, 255);
u8g.drawBitmapP( 2, 2, 16/8, 16, epd_bitmap_icons[previous]);
u8g.setFont(u8g_font_7x14);
u8g.drawStr(20, 15, menu_items[previous]);
//selected
u8g.drawBitmapP( 2, 24, 16/8, 16, epd_bitmap_icons[selected]);
u8g.setFont(u8g_font_7x14B);
u8g.drawStr(20, 37, menu_items[selected]);
//next
u8g.drawBitmapP( 2, 46, 16/8, 16, epd_bitmap_icons[next]);
u8g.setFont(u8g_font_7x14);
u8g.drawStr(20, 59, menu_items[next]);
u8g.drawBitmapP( 0, 22, 128/8, 21, epd_bitmap_selection); //selection
}
else if (current_screen == 1) {
analogWrite(pinB, 0);
analogWrite(pinR, 255);
analogWrite(pinG, 255);
// SCREENSHOTS SCREEN
if(bitmap_screenshots[selected] == epd_bitmap_ones_at_the_moment){
u8g.setFont(u8g_font_7x14);
u8g.drawStr(3, 21, menu_items_[previous_]);
//selected
u8g.setFont(u8g_font_7x14B);
u8g.drawStr(3, 40, menu_items_[selected_]);
//next
u8g.setFont(u8g_font_7x14);
u8g.drawStr(3, 58, menu_items_[next_]);
u8g.drawBitmapP( 0, 28, 128/8, 16, epd_bitmap_selection_2); //selection
u8g.drawBitmapP( 0, 0, 128/8, 9, epd_bitmap_ones_at_the_moment_1);
}
else{
u8g.drawBitmapP( 0, 0, 128/8, 64, bitmap_screenshots[selected]); // draw screenshot
}
}
else{
if(rooms[selected_] == R2){
analogWrite(pinB, 0);
analogWrite(pinR, 255);
analogWrite(pinG, 255);
digitalWrite(wheel_1A, HIGH);
digitalWrite(wheel_2A, HIGH);
delay(5000);
digitalWrite(wheel_2A, LOW);
delay(500);
digitalWrite(wheel_2A, HIGH);
delay(2000);
digitalWrite(wheel_1B, HIGH);
digitalWrite(wheel_2B, HIGH);
delay(2000);
digitalWrite(wheel_2B, LOW);
delay(500);
digitalWrite(wheel_2B, HIGH);
delay(5000);
}
else if (rooms[selected_] == R3){
digitalWrite(wheel_1A, HIGH);
digitalWrite(wheel_2A, HIGH);
delay(7000);
digitalWrite(wheel_2A, LOW);
delay(500);
digitalWrite(wheel_2A, HIGH);
delay(2000);
digitalWrite(wheel_1B, HIGH);
digitalWrite(wheel_2B, HIGH);
delay(2000);
digitalWrite(wheel_2B, LOW);
delay(500);
digitalWrite(wheel_2B, HIGH);
delay(7000);
}
else{
digitalWrite(wheel_1A, HIGH);
digitalWrite(wheel_2A, HIGH);
delay(10000);
digitalWrite(wheel_2A, LOW);
delay(500);
digitalWrite(wheel_2A, HIGH);
delay(2000);
digitalWrite(wheel_1B, HIGH);
digitalWrite(wheel_2B, HIGH);
delay(2000);
digitalWrite(wheel_2B, LOW);
delay(500);
digitalWrite(wheel_2B, HIGH);
delay(10000);
}
current_screen = 0;
}
}while ( u8g.nextPage() );
}
else{u8g.firstPage(); // Start clearing the first page
do {
analogWrite(pinG, 0);
analogWrite(pinR, 0);
analogWrite(pinB, 0);
u8g.setColorIndex(0); // Set the color index to 0 (clear)
u8g.drawBox(0, 0, u8g.getWidth(), u8g.getHeight()); // Draw a box covering the entire display to clear it
} while (u8g.nextPage()); // Continue to the next page if available
}
}