#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
#define OLED_RESET -1
#define SCREEN_ADDRESS 0x3C
#define LEFT_WIDTH 96
#define RIGHT_WIDTH 32
// Button pins
#define BTN_SELECT 15
#define BTN_LEFT 4
#define BTN_RIGHT 5
#define BTN_BACK 26
// New back button pin
// animation part codes and variables starts from here
bool isRunning = false;
unsigned long startTime = 0;
bool exitRequested = false;
bool lastBackState = HIGH;
// Boot animation frames (4 frames)
const unsigned char bootFrame1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xff, 0x9f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xff, 0x9f, 0xe7, 0xf9, 0xe7, 0x80, 0x0f, 0xcf, 0xbf, 0x7e, 0xfc, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xe7, 0x80, 0x0f, 0xdf, 0xbf, 0x7e, 0xfc, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xe7, 0x80, 0x0c, 0x18, 0x33, 0x06, 0x0c, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9f, 0xe7, 0x81, 0xff, 0x80, 0x0f, 0xdf, 0xb3, 0x3e, 0x7c, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9f, 0xe7, 0x81, 0xff, 0x80, 0x0f, 0xdf, 0xbf, 0x3e, 0xfc, 0x01,
0x80, 0x06, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xf8, 0x00, 0x0c, 0x01, 0xbe, 0x06, 0xc0, 0x01,
0x80, 0x06, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xf8, 0x00, 0x0f, 0xdf, 0xb0, 0x7e, 0xfc, 0x01,
0x80, 0x07, 0xf8, 0x01, 0xff, 0x9f, 0xe7, 0xf9, 0xff, 0x80, 0x07, 0xdf, 0x30, 0x7e, 0xfc, 0x01,
0x80, 0x07, 0xf8, 0x01, 0xff, 0x9f, 0xe7, 0xf9, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xf8, 0x31, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xf8, 0x31, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 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, 0xff, 0xff, 0xff, 0xff
};
const unsigned char bootFrame2 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x00, 0x60, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x00, 0x60, 0x18, 0x06, 0x18, 0x7f, 0xf0, 0x30, 0x40, 0x81, 0x03, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x18, 0x7f, 0xf0, 0x20, 0x40, 0x81, 0x03, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x18, 0x7f, 0xf3, 0xe7, 0xcc, 0xf9, 0xf3, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x60, 0x18, 0x7e, 0x00, 0x7f, 0xf0, 0x20, 0x4c, 0xc1, 0x83, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x60, 0x18, 0x7e, 0x00, 0x7f, 0xf0, 0x20, 0x40, 0xc1, 0x03, 0xfe,
0x7f, 0xf9, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x07, 0xff, 0xf3, 0xfe, 0x41, 0xf9, 0x3f, 0xfe,
0x7f, 0xf9, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x07, 0xff, 0xf0, 0x20, 0x4f, 0x81, 0x03, 0xfe,
0x7f, 0xf8, 0x07, 0xfe, 0x00, 0x60, 0x18, 0x06, 0x00, 0x7f, 0xf8, 0x20, 0xcf, 0x81, 0x03, 0xfe,
0x7f, 0xf8, 0x07, 0xfe, 0x00, 0x60, 0x18, 0x06, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x07, 0xce, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x07, 0xce, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
const unsigned char bootFrame3 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xff, 0x9f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xff, 0x81, 0xff, 0x9f, 0xe7, 0xf9, 0xe7, 0x80, 0x0f, 0xcf, 0xbf, 0x7e, 0xfc, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xe7, 0x80, 0x0f, 0xdf, 0xbf, 0x7e, 0xfc, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xe7, 0x80, 0x0c, 0x18, 0x33, 0x06, 0x0c, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9f, 0xe7, 0x81, 0xff, 0x80, 0x0f, 0xdf, 0xb3, 0x3e, 0x7c, 0x01,
0x80, 0x00, 0x78, 0x01, 0xe7, 0x9f, 0xe7, 0x81, 0xff, 0x80, 0x0f, 0xdf, 0xbf, 0x3e, 0xfc, 0x01,
0x80, 0x06, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xf8, 0x00, 0x0c, 0x01, 0xbe, 0x06, 0xc0, 0x01,
0x80, 0x06, 0x78, 0x01, 0xe7, 0x9e, 0x07, 0x81, 0xf8, 0x00, 0x0f, 0xdf, 0xb0, 0x7e, 0xfc, 0x01,
0x80, 0x07, 0xf8, 0x01, 0xff, 0x9f, 0xe7, 0xf9, 0xff, 0x80, 0x07, 0xdf, 0x30, 0x7e, 0xfc, 0x01,
0x80, 0x07, 0xf8, 0x01, 0xff, 0x9f, 0xe7, 0xf9, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xf8, 0x31, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x07, 0xf8, 0x31, 0xfe, 0x1f, 0xe7, 0xf9, 0xe7, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 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, 0xff, 0xff, 0xff, 0xff};
const unsigned char bootFrame4 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x00, 0x60, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x00, 0x7e, 0x00, 0x60, 0x18, 0x06, 0x18, 0x7f, 0xf0, 0x30, 0x40, 0x81, 0x03, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x18, 0x7f, 0xf0, 0x20, 0x40, 0x81, 0x03, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x18, 0x7f, 0xf3, 0xe7, 0xcc, 0xf9, 0xf3, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x60, 0x18, 0x7e, 0x00, 0x7f, 0xf0, 0x20, 0x4c, 0xc1, 0x83, 0xfe,
0x7f, 0xff, 0x87, 0xfe, 0x18, 0x60, 0x18, 0x7e, 0x00, 0x7f, 0xf0, 0x20, 0x40, 0xc1, 0x03, 0xfe,
0x7f, 0xf9, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x07, 0xff, 0xf3, 0xfe, 0x41, 0xf9, 0x3f, 0xfe,
0x7f, 0xf9, 0x87, 0xfe, 0x18, 0x61, 0xf8, 0x7e, 0x07, 0xff, 0xf0, 0x20, 0x4f, 0x81, 0x03, 0xfe,
0x7f, 0xf8, 0x07, 0xfe, 0x00, 0x60, 0x18, 0x06, 0x00, 0x7f, 0xf8, 0x20, 0xcf, 0x81, 0x03, 0xfe,
0x7f, 0xf8, 0x07, 0xfe, 0x00, 0x60, 0x18, 0x06, 0x00, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x07, 0xce, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xf8, 0x07, 0xce, 0x01, 0xe0, 0x18, 0x06, 0x18, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
const unsigned char* bootFrames[] = {
bootFrame1,
bootFrame2,
bootFrame3,
bootFrame4
};
// Menu static images (96x32)
const unsigned char bluetoothStatic [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x9f, 0x01, 0xc0, 0x73, 0x9f, 0xe7, 0xf9, 0xfe,
0x7f, 0x9f, 0xe7, 0x39, 0x9f, 0x01, 0xc0, 0x73, 0x9f, 0xe7, 0xf9, 0xfe, 0x7f, 0x9f, 0xe7, 0x39,
0x9f, 0x01, 0xc0, 0x73, 0x9f, 0xe7, 0xf9, 0xfe, 0x7f, 0x9f, 0xe7, 0x39, 0x98, 0xc1, 0xc0, 0x73,
0x9c, 0x00, 0xc1, 0xce, 0x73, 0x83, 0x07, 0x39, 0x98, 0xc1, 0xc0, 0x73, 0x9c, 0x00, 0xc1, 0xce,
0x73, 0x83, 0x07, 0x39, 0x98, 0xc1, 0xc0, 0x73, 0x9c, 0x00, 0xc1, 0xce, 0x73, 0x83, 0x07, 0x39,
0x9f, 0xf9, 0xc0, 0x73, 0x9f, 0xe0, 0xc1, 0xce, 0x73, 0x83, 0x07, 0xf9, 0x9f, 0xf9, 0xc0, 0x73,
0x9f, 0xe0, 0xc1, 0xce, 0x73, 0x83, 0x07, 0xf9, 0x98, 0x39, 0xc0, 0x73, 0x9c, 0x00, 0xc1, 0xce,
0x73, 0x83, 0x07, 0x39, 0x98, 0x39, 0xc0, 0x73, 0x9c, 0x00, 0xc1, 0xce, 0x73, 0x83, 0x07, 0x39,
0x98, 0x39, 0xc0, 0x73, 0x9c, 0x00, 0xc1, 0xce, 0x73, 0x83, 0x07, 0x39, 0x9f, 0xf9, 0xfe, 0x7f,
0x9f, 0xe0, 0xc1, 0xfe, 0x7f, 0x83, 0x07, 0x39, 0x9f, 0xf9, 0xfe, 0x7f, 0x9f, 0xe0, 0xc1, 0xfe,
0x7f, 0x83, 0x07, 0x39, 0x9f, 0xf9, 0xfe, 0x7f, 0x9f, 0xe0, 0xc1, 0xfe, 0x7f, 0x83, 0x07, 0x39,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
const unsigned char appleStatic [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x87, 0xfb, 0xfd, 0xce,
0xfe, 0x00, 0xff, 0x7f, 0xbf, 0xdc, 0x0f, 0xf1, 0x87, 0xfb, 0xfd, 0xce, 0xfe, 0x00, 0xff, 0x7f,
0xbf, 0xdc, 0x0f, 0xf1, 0x87, 0xfb, 0xfd, 0xce, 0xff, 0x80, 0xff, 0x7f, 0xbf, 0xdc, 0x0f, 0xf1,
0x87, 0x03, 0x9d, 0xce, 0xe3, 0x80, 0xe7, 0x73, 0xb9, 0xdc, 0x0e, 0x01, 0x87, 0x03, 0x9d, 0xce,
0xe3, 0x80, 0xe7, 0x73, 0xb9, 0xdc, 0x0e, 0x01, 0x87, 0xfb, 0x9d, 0xce, 0xe3, 0x80, 0xe7, 0x73,
0xb9, 0xdc, 0x0e, 0x01, 0x87, 0xfb, 0x9d, 0xce, 0xff, 0xc0, 0xff, 0x7f, 0xbf, 0xdc, 0x0f, 0xf1,
0x87, 0xfb, 0x9d, 0xce, 0xff, 0xc0, 0xff, 0x7f, 0x3f, 0x9c, 0x0f, 0xf1, 0x80, 0x3b, 0x9d, 0xce,
0xe1, 0xc0, 0xe7, 0x70, 0x38, 0x1c, 0x0e, 0x01, 0x80, 0x3b, 0x9d, 0xce, 0xe1, 0xc0, 0xe7, 0x70,
0x38, 0x1c, 0x0e, 0x01, 0x87, 0xfb, 0x9d, 0xce, 0xe1, 0xc0, 0xe7, 0x70, 0x38, 0x1c, 0x0e, 0x01,
0x87, 0xfb, 0xfd, 0xfe, 0xe1, 0xc0, 0xe7, 0x70, 0x38, 0x1f, 0xef, 0xf1, 0x87, 0xfb, 0xfd, 0xfe,
0xe1, 0xc0, 0xe7, 0x70, 0x38, 0x1f, 0xef, 0xf1, 0x87, 0xfb, 0xfd, 0xfe, 0xe1, 0xc0, 0xe7, 0x70,
0x38, 0x1f, 0xef, 0xf1, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
const unsigned char radioStatic [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x8f, 0xe0, 0x7f, 0xdf, 0x87, 0xfd, 0xff, 0x01,
0xff, 0x73, 0xdc, 0xf2, 0x8f, 0xe0, 0x7f, 0xdf, 0x87, 0xfd, 0xff, 0x01, 0xff, 0x73, 0xdc, 0xf2,
0x8f, 0xe0, 0x7f, 0xdf, 0x87, 0xfd, 0xff, 0x01, 0xff, 0x73, 0xdc, 0xf2, 0x8f, 0xe0, 0x7f, 0xdf,
0x87, 0xfd, 0xff, 0x01, 0xff, 0x73, 0xdc, 0xf2, 0x8f, 0x1c, 0x73, 0xdc, 0xf0, 0xe1, 0xc7, 0x01,
0xcf, 0x73, 0xdc, 0xf2, 0x8f, 0x1c, 0x73, 0xdc, 0xf0, 0xe1, 0xc7, 0x01, 0xcf, 0x73, 0xdc, 0xf2,
0x8f, 0x1c, 0x73, 0xdc, 0xf0, 0xe1, 0xc7, 0x01, 0xcf, 0x73, 0xdc, 0xf2, 0x8f, 0xfc, 0x7f, 0xdc,
0xf0, 0xe1, 0xc7, 0x01, 0xff, 0x73, 0xc7, 0x82, 0x8f, 0xfc, 0x7f, 0xdc, 0xf0, 0xe1, 0xc7, 0x01,
0xff, 0x73, 0xc7, 0x82, 0x8f, 0xfc, 0x7f, 0xdc, 0xf0, 0xe1, 0xc7, 0x01, 0xff, 0x73, 0xc7, 0x82,
0x8f, 0xfc, 0x7f, 0xdc, 0xf0, 0xe1, 0xc7, 0x01, 0xff, 0x73, 0xc7, 0x82, 0x8f, 0x0f, 0x73, 0xdc,
0xf0, 0xe1, 0xc7, 0x01, 0xcf, 0x73, 0xdc, 0xf2, 0x8f, 0x0f, 0x73, 0xdc, 0xf0, 0xe1, 0xc7, 0x01,
0xcf, 0x73, 0xdc, 0xf2, 0x8f, 0x0f, 0x73, 0xdc, 0xf0, 0xe1, 0xc7, 0x01, 0xcf, 0x73, 0xdc, 0xf2,
0x8f, 0x0f, 0x73, 0xdf, 0xf7, 0xfd, 0xff, 0x01, 0xcf, 0x7f, 0xdc, 0xf2, 0x8f, 0x0f, 0x73, 0xdf,
0xf7, 0xfd, 0xff, 0x01, 0xcf, 0x7f, 0xdc, 0xf2, 0x8f, 0x0f, 0x73, 0xdf, 0xf7, 0xfd, 0xff, 0x01,
0xcf, 0x7f, 0xdc, 0xf2, 0x8f, 0x0f, 0x73, 0xdf, 0xf7, 0xfd, 0xff, 0x01, 0xcf, 0x7f, 0xdc, 0xf2,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe
};
const unsigned char irStatic [] PROGMEM = {};
const unsigned char usbStatic [] PROGMEM = {};
const unsigned char ibuttonStatic [] PROGMEM = {};
const unsigned char settingsStatic [] PROGMEM = {};
// Bluetooth animation frames (32x32)
const unsigned char bluetoothAnim1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x78, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x30, 0x6e, 0x00, 0x01, 0x38, 0x67, 0x00, 0x01,
0x1c, 0x63, 0x80, 0x01, 0x0e, 0x61, 0xc0, 0x01, 0x07, 0x61, 0xc0, 0x01, 0x03, 0xe3, 0x80, 0x01,
0x01, 0xe7, 0x00, 0x01, 0x00, 0xee, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x00, 0x78, 0x40, 0x01,
0x00, 0xfc, 0x00, 0x01, 0x01, 0xee, 0x00, 0x01, 0x03, 0xe7, 0x00, 0x01, 0x07, 0x63, 0x80, 0x01,
0x0e, 0x61, 0xc0, 0x01, 0x1c, 0x61, 0xc0, 0x01, 0x38, 0x63, 0x80, 0x01, 0x30, 0x67, 0x00, 0x01,
0x00, 0x6e, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x00, 0x78, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x60, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char bluetoothAnim2 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x78, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x30, 0x6e, 0x00, 0x01, 0x38, 0x67, 0x00, 0x01,
0x1c, 0x63, 0x80, 0x01, 0x0e, 0x61, 0xc0, 0x01, 0x07, 0x61, 0xc0, 0x01, 0x03, 0xe3, 0x80, 0x01,
0x01, 0xe7, 0x18, 0x01, 0x00, 0xee, 0x1c, 0x01, 0x00, 0x7c, 0x0c, 0x01, 0x00, 0x78, 0x4c, 0x01,
0x00, 0xfc, 0x0c, 0x01, 0x01, 0xee, 0x1c, 0x01, 0x03, 0xe7, 0x18, 0x01, 0x07, 0x63, 0x80, 0x01,
0x0e, 0x61, 0xc0, 0x01, 0x1c, 0x61, 0xc0, 0x01, 0x38, 0x63, 0x80, 0x01, 0x30, 0x67, 0x00, 0x01,
0x00, 0x6e, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x00, 0x78, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x60, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char bluetoothAnim3 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x78, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x30, 0x6e, 0x00, 0x01, 0x38, 0x67, 0x06, 0x01,
0x1c, 0x63, 0x87, 0x01, 0x0e, 0x61, 0xc3, 0x81, 0x07, 0x61, 0xc1, 0xc1, 0x03, 0xe3, 0x80, 0xc1,
0x01, 0xe7, 0x18, 0xc1, 0x00, 0xee, 0x1c, 0xc1, 0x00, 0x7c, 0x0c, 0xc1, 0x00, 0x78, 0x4c, 0xc1,
0x00, 0xfc, 0x0c, 0xc1, 0x01, 0xee, 0x1c, 0xc1, 0x03, 0xe7, 0x18, 0xc1, 0x07, 0x63, 0x80, 0xc1,
0x0e, 0x61, 0xc1, 0xc1, 0x1c, 0x61, 0xc3, 0x81, 0x38, 0x63, 0x87, 0x01, 0x30, 0x67, 0x06, 0x01,
0x00, 0x6e, 0x00, 0x01, 0x00, 0x7c, 0x00, 0x01, 0x00, 0x78, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x60, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char bluetoothAnim4 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x60, 0x00, 0x01, 0x00, 0x70, 0x00, 0x01,
0x00, 0x78, 0x00, 0xc1, 0x00, 0x7c, 0x00, 0xf1, 0x30, 0x6e, 0x00, 0x79, 0x38, 0x67, 0x06, 0x1d,
0x1c, 0x63, 0x87, 0x0d, 0x0e, 0x61, 0xc3, 0x8d, 0x07, 0x61, 0xc1, 0xcd, 0x03, 0xe3, 0x80, 0xcd,
0x01, 0xe7, 0x18, 0xcd, 0x00, 0xee, 0x1c, 0xcd, 0x00, 0x7c, 0x0c, 0xcd, 0x00, 0x78, 0x4c, 0xcd,
0x00, 0xfc, 0x0c, 0xcd, 0x01, 0xee, 0x1c, 0xcd, 0x03, 0xe7, 0x18, 0xcd, 0x07, 0x63, 0x80, 0xcd,
0x0e, 0x61, 0xc1, 0xcd, 0x1c, 0x61, 0xc3, 0x8d, 0x38, 0x63, 0x87, 0x09, 0x30, 0x67, 0x06, 0x19,
0x00, 0x6e, 0x00, 0x71, 0x00, 0x7c, 0x00, 0xe1, 0x00, 0x78, 0x00, 0xc1, 0x00, 0x70, 0x00, 0x01,
0x00, 0x60, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
// Apple animation frames (32x32)
const unsigned char appleAnim1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x70, 0x01,
0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x01, 0x00, 0x7f, 0xff, 0x01,
0x00, 0xff, 0xff, 0x01, 0x00, 0xff, 0xfe, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfc, 0x01,
0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfe, 0x01, 0x00, 0xff, 0xff, 0x81,
0x00, 0xff, 0xff, 0x81, 0x00, 0x7f, 0xff, 0x01, 0x00, 0x7f, 0xff, 0x01, 0x00, 0x3f, 0xfe, 0x01,
0x00, 0x1e, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char appleAnim2 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x18, 0x01, 0x00, 0x01, 0xc0, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x70, 0x01,
0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x01, 0x00, 0x7f, 0xff, 0x01,
0x00, 0x3f, 0xff, 0xc1, 0x00, 0xff, 0xfe, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x0f, 0xff, 0xe0, 0x01,
0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x00, 0x3f, 0xff, 0xc1, 0x00, 0xff, 0xff, 0x81,
0x00, 0xff, 0xff, 0x81, 0x07, 0xff, 0xf0, 0x01, 0x00, 0x7f, 0xff, 0x01, 0x00, 0x3f, 0xfe, 0x01,
0x00, 0x03, 0xcf, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char appleAnim3 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x38, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x1e, 0x01,
0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x01, 0x00, 0x7f, 0xff, 0x01,
0x00, 0x38, 0xff, 0xe1, 0x00, 0xff, 0xfe, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x00, 0x1f, 0x83, 0xc1,
0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x1f, 0xc1, 0xc0, 0x01, 0x00, 0xff, 0xff, 0x81,
0x00, 0xff, 0xff, 0x81, 0x00, 0x38, 0x3f, 0xc1, 0x00, 0x7f, 0xff, 0x01, 0x00, 0x3f, 0xfe, 0x01,
0x00, 0x1e, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char appleAnim4 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x78, 0x01, 0x00, 0x00, 0x30, 0x01,
0x00, 0x00, 0x60, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x01, 0x00, 0x7f, 0xff, 0x01,
0x00, 0xff, 0xff, 0x01, 0x00, 0x3f, 0xfe, 0x01, 0x01, 0xff, 0xe0, 0x01, 0x03, 0xff, 0xf8, 0x01,
0x01, 0xff, 0xfc, 0x01, 0x01, 0xff, 0xfc, 0x01, 0x00, 0x7f, 0xff, 0x81, 0x00, 0xff, 0xfe, 0x01,
0x00, 0xff, 0xff, 0x81, 0x01, 0xff, 0xfc, 0x01, 0x00, 0x7f, 0xff, 0x01, 0x00, 0x3f, 0xfe, 0x01,
0x00, 0x06, 0x7c, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
// Radio animation frames (32x32)
const unsigned char radioAnim1 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x80, 0x01,
0x00, 0x06, 0x80, 0x01, 0x00, 0x05, 0x80, 0x01, 0x00, 0x08, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01,
0x00, 0x0b, 0x40, 0x01, 0x00, 0x0b, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x14, 0xa0, 0x01, 0x00, 0x13, 0x20, 0x01, 0x00, 0x14, 0xa0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x38, 0x70, 0x01, 0x00, 0x27, 0x90, 0x01, 0x00, 0x38, 0x70, 0x01, 0x00, 0x40, 0x08, 0x01,
0x00, 0x40, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char radioAnim2 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 0x40, 0x01,
0x00, 0x13, 0x20, 0x01, 0x00, 0x13, 0x20, 0x01, 0x00, 0x0b, 0x40, 0x01, 0x00, 0x04, 0x80, 0x01,
0x00, 0x06, 0x80, 0x01, 0x00, 0x05, 0x80, 0x01, 0x00, 0x08, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01,
0x00, 0x0b, 0x40, 0x01, 0x00, 0x0b, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x14, 0xa0, 0x01, 0x00, 0x13, 0x20, 0x01, 0x00, 0x14, 0xa0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x38, 0x70, 0x01, 0x00, 0x27, 0x90, 0x01, 0x00, 0x38, 0x70, 0x01, 0x00, 0x40, 0x08, 0x01,
0x00, 0x40, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char radioAnim3 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x00, 0x40, 0x08, 0x01, 0x00, 0x80, 0x04, 0x01, 0x01, 0x08, 0x42, 0x01,
0x01, 0x13, 0x22, 0x01, 0x01, 0x13, 0x22, 0x01, 0x01, 0x0b, 0x42, 0x01, 0x00, 0x84, 0x84, 0x01,
0x00, 0x46, 0x88, 0x01, 0x00, 0x05, 0x80, 0x01, 0x00, 0x08, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01,
0x00, 0x0b, 0x40, 0x01, 0x00, 0x0b, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x14, 0xa0, 0x01, 0x00, 0x13, 0x20, 0x01, 0x00, 0x14, 0xa0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x38, 0x70, 0x01, 0x00, 0x27, 0x90, 0x01, 0x00, 0x38, 0x70, 0x01, 0x00, 0x40, 0x08, 0x01,
0x00, 0x40, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
const unsigned char radioAnim4 [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x81,
0x08, 0x00, 0x00, 0x41, 0x10, 0x40, 0x08, 0x21, 0x20, 0x80, 0x04, 0x11, 0x21, 0x08, 0x42, 0x11,
0x21, 0x13, 0x22, 0x11, 0x21, 0x13, 0x22, 0x11, 0x21, 0x0b, 0x42, 0x11, 0x20, 0x84, 0x84, 0x11,
0x10, 0x46, 0x88, 0x21, 0x08, 0x05, 0x80, 0x41, 0x04, 0x08, 0x40, 0x81, 0x00, 0x0c, 0xc0, 0x01,
0x00, 0x0b, 0x40, 0x01, 0x00, 0x0b, 0x40, 0x01, 0x00, 0x0c, 0xc0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x14, 0xa0, 0x01, 0x00, 0x13, 0x20, 0x01, 0x00, 0x14, 0xa0, 0x01, 0x00, 0x18, 0x60, 0x01,
0x00, 0x38, 0x70, 0x01, 0x00, 0x27, 0x90, 0x01, 0x00, 0x38, 0x70, 0x01, 0x00, 0x40, 0x08, 0x01,
0x00, 0x40, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff
};
// IR animation frames (32x32)
const unsigned char irAnim1 [] PROGMEM = {};
const unsigned char irAnim2 [] PROGMEM = {};
const unsigned char irAnim3 [] PROGMEM = {};
const unsigned char irAnim4 [] PROGMEM = {};
// USB animation frames (32x32)
const unsigned char usbAnim1 [] PROGMEM = {};
const unsigned char usbAnim2 [] PROGMEM = {};
const unsigned char usbAnim3 [] PROGMEM = {};
const unsigned char usbAnim4 [] PROGMEM = {};
// iButton animation frames (32x32)
const unsigned char ibuttonAnim1 [] PROGMEM = {};
const unsigned char ibuttonAnim2 [] PROGMEM = {};
const unsigned char ibuttonAnim3 [] PROGMEM = {};
const unsigned char ibuttonAnim4 [] PROGMEM = {};
// Settings animation frames (32x32)
const unsigned char settingsAnim1 [] PROGMEM = {};
const unsigned char settingsAnim2 [] PROGMEM = {};
const unsigned char settingsAnim3 [] PROGMEM = {};
const unsigned char settingsAnim4 [] PROGMEM = {};
// animation bitmap array ends here
// animation cycle list starts here
// Animation frame arrays for each menu item
const unsigned char* bluetoothFrames[] = {
bluetoothAnim1,
bluetoothAnim2,
bluetoothAnim3,
bluetoothAnim4
};
const unsigned char* appleFrames[] = {
appleAnim1,
appleAnim2,
appleAnim3,
appleAnim4
};
const unsigned char* radioFrames[] = {
radioAnim1,
radioAnim2,
radioAnim3,
radioAnim4
};
const unsigned char* irFrames[] = {
irAnim1,
irAnim2,
irAnim3,
irAnim4
};
const unsigned char* usbFrames[] = {
usbAnim1,
usbAnim2,
usbAnim3,
usbAnim4
};
const unsigned char* ibuttonFrames[] = {
ibuttonAnim1,
ibuttonAnim2,
ibuttonAnim3,
ibuttonAnim4
};
const unsigned char* settingsFrames[] = {
settingsAnim1,
settingsAnim2,
settingsAnim3,
settingsAnim4
};
// Array of static menu images
const unsigned char* menuStatic[] = {
bluetoothStatic,
appleStatic,
radioStatic,
irStatic,
usbStatic,
ibuttonStatic,
settingsStatic
};
// Array of menu animation frame arrays
const unsigned char** menuAnimations[] = {
bluetoothFrames,
appleFrames,
radioFrames,
irFrames,
usbFrames,
ibuttonFrames,
settingsFrames
};
// animation cycle list ends here
const char* menuNames[] = {
"BLUETOOTH SCAN",
"SOUR APPLE",
"AM RADIO",
"IR REMOTE",
"USB",
"iBUTTON",
"SETTINGS"
};
const int menuSize = sizeof(menuStatic) / sizeof(menuStatic[0]);
int currentMenuItem = 0;
unsigned long lastFrameTime = 0;
int currentFrame = 0;
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
bool lastSelectState = HIGH;
bool lastLeftState = HIGH;
bool lastRightState = HIGH;
void setup() {
Serial.begin(115200);
pinMode(BTN_SELECT, INPUT_PULLUP);
pinMode(BTN_LEFT, INPUT_PULLUP);
pinMode(BTN_RIGHT, INPUT_PULLUP);
pinMode(BTN_BACK, INPUT_PULLUP); // Initialize back button
if(!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
for(;;);
}
display.clearDisplay();
display.cp437(true);
displayBootAnimation();
}
void loop() {
handleButtons();
updateDisplay();
;
}
void handleButtons() {
bool selectState = digitalRead(BTN_SELECT);
bool leftState = digitalRead(BTN_LEFT);
bool rightState = digitalRead(BTN_RIGHT);
bool backState = digitalRead(BTN_BACK);
if (leftState == LOW && lastLeftState == HIGH) {
currentMenuItem = (currentMenuItem > 0) ? currentMenuItem - 1 : menuSize - 1;
currentFrame = 0;
}
if (rightState == LOW && lastRightState == HIGH) {
currentMenuItem = (currentMenuItem + 1) % menuSize;
currentFrame = 0;
}
if (selectState == LOW && lastSelectState == HIGH) {
executeMenuItem(currentMenuItem);
}
if (backState == LOW && lastBackState == HIGH && isRunning) {
exitRequested = true;
}
lastSelectState = selectState;
lastLeftState = leftState;
lastRightState = rightState;
lastBackState = backState;
}
void updateDisplay() {
display.clearDisplay();
display.drawBitmap(0, 0, menuStatic[currentMenuItem], LEFT_WIDTH, SCREEN_HEIGHT, SSD1306_WHITE);
if (millis() - lastFrameTime >= 250) {
currentFrame = (currentFrame + 1) % 4;
lastFrameTime = millis();
}
display.drawBitmap(LEFT_WIDTH, 0, menuAnimations[currentMenuItem][currentFrame],
RIGHT_WIDTH, SCREEN_HEIGHT, SSD1306_WHITE);
display.display();
}
void displayBootAnimation() {
const int frameCount = 4;
const int framesPerSecond = 4;
const int totalDuration = 2000;
const int frameDelay = 1000 / framesPerSecond;
const int totalFrames = (totalDuration / 1000) * framesPerSecond;
for(int i = 0; i < totalFrames; i++) {
display.clearDisplay();
display.drawBitmap(0, 0, bootFrames[i % frameCount], SCREEN_WIDTH, SCREEN_HEIGHT, SSD1306_WHITE);
display.display();
delay(frameDelay);
}
}
void showRunningScreen(const char* programName) {
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Running:");
display.setCursor(0, 16);
display.print(programName);
display.display();
delay(1000);
}
void displayRuntime(unsigned long runtime) {
display.clearDisplay();
display.setTextSize(1);
display.setCursor(0, 0);
display.print("Runtime:");
display.setCursor(0, 16);
display.print(runtime / 1000); // Convert to seconds
display.print(".");
display.print((runtime % 1000) / 100); // First decimal place
display.print("s");
display.display();
}
void checkExitCondition() {
bool backState = digitalRead(BTN_BACK);
if (backState == LOW && lastBackState == HIGH) {
exitRequested = true;
}
lastBackState = backState;
}
void runBluetoothScan() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
// Clear display at start of loop
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your Bluetooth scanning code here
display.setCursor(0, 0);
display.println("Bluetooth Scan");
display.println("Running...");
// Update display
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runSourApple() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your SourApple code here
display.setCursor(0, 0);
display.println("Sour Apple");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runAMRadio() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your AM Radio code here
display.setCursor(0, 0);
display.println("AM Radio");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runIRRemote() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your IR Remote code here
display.setCursor(0, 0);
display.println("IR Remote");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runUSB() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your USB code here
display.setCursor(0, 0);
display.println("USB");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runIButton() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your iButton code here
display.setCursor(0, 0);
display.println("iButton");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void runSettings() {
startTime = millis();
exitRequested = false;
isRunning = true;
while (!exitRequested) {
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(SSD1306_WHITE);
// Your Settings code here
display.setCursor(0, 0);
display.println("Settings");
display.println("Running...");
display.display();
checkExitCondition();
delay(100);
}
isRunning = false;
}
void executeMenuItem(int item) {
showRunningScreen(menuNames[item]);
switch(item) {
case 0:
runBluetoothScan();
break;
case 1:
runSourApple();
break;
case 2:
runAMRadio();
break;
case 3:
runIRRemote();
break;
case 4:
runUSB();
break;
case 5:
runIButton();
break;
case 6:
runSettings();
break;
}
display.clearDisplay();
isRunning = false;
}Loading
ssd1306
ssd1306