//for Arduino pro Micro
/*
This is a small project of a video game controller
with arduino pro micro using an SSSD 1306 OLED screen.
I intend to use the small display to show the names of the buttons of different consoles (for example, if the controller is from SNES (YBXALR), if it is from Genesis/Megadrive (ABCXYZ), NES (BATATB), etc...
In the future I plan on putting a game on the screen to be used with an external charger.
*/
/*
// Arduino Pro Micro
#define LeftBtn 21
#define UpBtn 20
#define RightBtn 19
#define DowntBtn 18
#define Btn1 15
#define Btn2 14
#define Btn3 16
#define Btn4 10
#define BtnL 9
#define BtnR 8
#define BtnSL 7
#define BtnST 6
#define BtnHome 5
#define BtnOption 4
*/
// to this emulator - Arduino Nano
#define LeftBtn 2
#define UpBtn 3
#define RightBtn 4
#define DowntBtn 5
#define Btn1 6
#define Btn2 7
#define Btn3 8
#define Btn4 9
#define BtnL 10
#define BtnR 11
#define BtnSL 12
#define BtnST 13
#define BtnHome A0
#define BtnOption A1
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
//Inicio Imagens
// '1', 15x15px
const unsigned char epd_bitmap_1 [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x41, 0x04, 0x83, 0x02, 0x81, 0x02, 0x81, 0x02,
0x81, 0x02, 0x81, 0x02, 0x43, 0x84, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// '2', 15x15px
const unsigned char epd_bitmap_2 [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x43, 0x84, 0x84, 0x42, 0x80, 0x42, 0x83, 0x82,
0x84, 0x02, 0x84, 0x02, 0x47, 0xc4, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'A', 15x15px
const unsigned char epd_bitmap_A [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x41, 0x04, 0x82, 0x82, 0x84, 0x42, 0x84, 0x42,
0x87, 0xc2, 0x84, 0x42, 0x44, 0x44, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'B', 15x15px
const unsigned char epd_bitmap_B [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x47, 0x84, 0x84, 0x42, 0x84, 0x42, 0x87, 0x82,
0x84, 0x42, 0x84, 0x42, 0x47, 0x84, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'C', 15x15px
const unsigned char epd_bitmap_C [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x43, 0x84, 0x84, 0x42, 0x84, 0x02, 0x84, 0x02,
0x84, 0x02, 0x84, 0x42, 0x43, 0x84, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'D', 15x15px
const unsigned char epd_bitmap_D [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x47, 0x84, 0x84, 0x42, 0x84, 0x42, 0x84, 0x42,
0x84, 0x42, 0x84, 0x42, 0x47, 0x84, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'DPAD Down', 26x26px
const unsigned char epd_bitmap_DPAD_Down [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x10, 0x00, 0x02, 0x00,
0x10, 0x00, 0x02, 0x00, 0x10, 0x0c, 0x02, 0x00, 0x10, 0x1e, 0x02, 0x00, 0x0f, 0xff, 0xfc, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD Down-Left', 26x26px
const unsigned char epd_bitmap_DPAD_Down_Left [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x1f, 0xf0, 0x02, 0x00,
0x1f, 0xf8, 0x02, 0x00, 0x1f, 0xfc, 0x02, 0x00, 0x1f, 0xfe, 0x02, 0x00, 0x0f, 0xff, 0xfc, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD Down-Right', 26x26px
const unsigned char epd_bitmap_DPAD_Down_Right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x10, 0x03, 0xfe, 0x00,
0x10, 0x07, 0xfe, 0x00, 0x10, 0x0f, 0xfe, 0x00, 0x10, 0x1f, 0xfe, 0x00, 0x0f, 0xff, 0xfc, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD Left', 26x26px
const unsigned char epd_bitmap_DPAD_Left [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x1f, 0xf0, 0x02, 0x00,
0x1f, 0xf8, 0x02, 0x00, 0x1f, 0xf8, 0x02, 0x00, 0x1f, 0xf0, 0x02, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD Neutro', 26x26px
const unsigned char epd_bitmap_DPAD_Neutro [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x10, 0x00, 0x02, 0x00,
0x10, 0x00, 0x02, 0x00, 0x10, 0x00, 0x02, 0x00, 0x10, 0x00, 0x02, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD Right', 26x26px
const unsigned char epd_bitmap_DPAD_Right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x0f, 0xe1, 0xfc, 0x00, 0x10, 0x03, 0xfe, 0x00,
0x10, 0x07, 0xfe, 0x00, 0x10, 0x07, 0xfe, 0x00, 0x10, 0x03, 0xfe, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD UP', 26x26px
const unsigned char epd_bitmap_DPAD_UP [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x10, 0x1e, 0x02, 0x00,
0x10, 0x0c, 0x02, 0x00, 0x10, 0x00, 0x02, 0x00, 0x10, 0x00, 0x02, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD UP-Left', 26x26px
const unsigned char epd_bitmap_DPAD_UP_Left [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x1f, 0xfe, 0x02, 0x00,
0x1f, 0xfc, 0x02, 0x00, 0x1f, 0xf8, 0x02, 0x00, 0x1f, 0xf0, 0x02, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'DPAD UP-Right', 26x26px
const unsigned char epd_bitmap_DPAD_UP_Right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,
0x00, 0x3f, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x10, 0x1f, 0xfe, 0x00,
0x10, 0x0f, 0xfe, 0x00, 0x10, 0x07, 0xfe, 0x00, 0x10, 0x03, 0xfe, 0x00, 0x0f, 0xe1, 0xfc, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
0x00, 0x21, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'Home', 30x30px
const unsigned char epd_bitmap_Home [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7f, 0xff, 0xff, 0xf8, 0xc0, 0x00, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x04,
0x80, 0x03, 0x00, 0x04, 0x80, 0x0f, 0xc0, 0x04, 0x80, 0x1f, 0xe0, 0x04, 0x80, 0x7f, 0xf8, 0x04,
0x80, 0xff, 0xfc, 0x04, 0x81, 0xff, 0xfe, 0x04, 0x80, 0xff, 0xfc, 0x04, 0x80, 0xff, 0xfc, 0x04,
0x80, 0xfc, 0xfc, 0x04, 0x80, 0xfc, 0xfc, 0x04, 0x80, 0xfc, 0xfc, 0x04, 0x80, 0xfc, 0xfc, 0x04,
0x80, 0xff, 0xfc, 0x04, 0x80, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x04,
0xc0, 0x00, 0x00, 0x0c, 0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// 'I', 15x15px
const unsigned char epd_bitmap_I [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x43, 0x84, 0x81, 0x02, 0x81, 0x02, 0x81, 0x02,
0x81, 0x02, 0x81, 0x02, 0x43, 0x84, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'II', 15x15px
const unsigned char epd_bitmap_II [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x47, 0xe4, 0x82, 0x42, 0x82, 0x42, 0x82, 0x42,
0x82, 0x42, 0x82, 0x42, 0x47, 0xe4, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'III', 25x13px
const unsigned char epd_bitmap_III [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0xee, 0xe0, 0x80,
0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80,
0x80, 0x44, 0x40, 0x80, 0x80, 0xee, 0xe0, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'IV', 25x13px
const unsigned char epd_bitmap_IV [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0xe4, 0x40, 0x80,
0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80, 0x80, 0x44, 0x40, 0x80,
0x80, 0x42, 0x80, 0x80, 0x80, 0xe1, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'L', 25x13px
const unsigned char epd_bitmap_L [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0x10, 0x00, 0x80,
0x80, 0x10, 0x00, 0x80, 0x80, 0x10, 0x00, 0x80, 0x80, 0x10, 0x00, 0x80, 0x80, 0x10, 0x00, 0x80,
0x80, 0x10, 0x00, 0x80, 0x80, 0x1f, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'L-', 25x13px
const unsigned char epd_bitmap_L_ [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0x80,
0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x3e, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80,
0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'Mode', 46x11px
const unsigned char epd_bitmap_Mode [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x08, 0x80, 0x08,
0x00, 0x04, 0x80, 0x0d, 0x80, 0x08, 0x00, 0x04, 0x80, 0x0a, 0x9c, 0x69, 0xc0, 0x04, 0x80, 0x0a,
0xa2, 0x9a, 0x20, 0x04, 0x80, 0x0a, 0xa2, 0x8b, 0xe0, 0x04, 0x80, 0x08, 0xa2, 0x9a, 0x00, 0x04,
0x80, 0x08, 0x9c, 0x69, 0xc0, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'Pause', 46x11px
const unsigned char epd_bitmap_Pause [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x78, 0x00, 0x00,
0x00, 0x04, 0x80, 0x44, 0x00, 0x00, 0x00, 0x04, 0x80, 0x44, 0xc4, 0x4f, 0x38, 0x04, 0x80, 0x78,
0x24, 0x50, 0x44, 0x04, 0x80, 0x40, 0xe4, 0x4e, 0x7c, 0x04, 0x80, 0x41, 0x24, 0xc1, 0x40, 0x04,
0x80, 0x40, 0xf3, 0x5e, 0x38, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'R', 25x13px
const unsigned char epd_bitmap_R [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0x3c, 0x00, 0x80,
0x80, 0x22, 0x00, 0x80, 0x80, 0x22, 0x00, 0x80, 0x80, 0x3c, 0x00, 0x80, 0x80, 0x28, 0x00, 0x80,
0x80, 0x24, 0x00, 0x80, 0x80, 0x22, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'RUN', 46x11px
const unsigned char epd_bitmap_RUN [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x78, 0x00,
0x00, 0x04, 0x80, 0x00, 0x44, 0x00, 0x00, 0x04, 0x80, 0x00, 0x45, 0x15, 0x80, 0x04, 0x80, 0x00,
0x79, 0x16, 0x40, 0x04, 0x80, 0x00, 0x51, 0x14, 0x40, 0x04, 0x80, 0x00, 0x49, 0x34, 0x40, 0x04,
0x80, 0x00, 0x44, 0xd4, 0x40, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'Reset', 46x11px
const unsigned char epd_bitmap_Reset [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x3c, 0x00, 0x00,
0x20, 0x04, 0x80, 0x22, 0x00, 0x00, 0x20, 0x04, 0x80, 0x22, 0x71, 0xe7, 0x70, 0x04, 0x80, 0x3c,
0x8a, 0x08, 0xa0, 0x04, 0x80, 0x24, 0xf9, 0xcf, 0xa0, 0x04, 0x80, 0x24, 0x80, 0x28, 0x20, 0x04,
0x80, 0x22, 0x7b, 0xc7, 0xb0, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'S-', 46x11px
const unsigned char epd_bitmap_S_ [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00,
0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00,
0x0f, 0x80, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04,
0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'Select', 46x11px
const unsigned char epd_bitmap_Select [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x81, 0xc0, 0x18, 0x00,
0x02, 0x04, 0x82, 0x20, 0x08, 0x00, 0x02, 0x04, 0x82, 0x07, 0x08, 0x71, 0xcf, 0x84, 0x81, 0xc8,
0x88, 0x8a, 0x22, 0x04, 0x80, 0x2f, 0x88, 0xfa, 0x02, 0x04, 0x82, 0x28, 0x08, 0x82, 0x22, 0x84,
0x81, 0xc7, 0x1c, 0x71, 0xc1, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'Start', 46x11px
const unsigned char epd_bitmap_Start [] PROGMEM = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x38, 0x40, 0x00,
0x10, 0x04, 0x80, 0x44, 0x40, 0x00, 0x10, 0x04, 0x80, 0x41, 0xf3, 0x16, 0x7c, 0x04, 0x80, 0x38,
0x40, 0x99, 0x10, 0x04, 0x80, 0x04, 0x43, 0x90, 0x10, 0x04, 0x80, 0x44, 0x54, 0x90, 0x14, 0x04,
0x80, 0x38, 0x23, 0xd0, 0x08, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0xff, 0xff,
0xff, 0xfc
};
// 'V', 15x15px
const unsigned char epd_bitmap_V [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x44, 0x44, 0x84, 0x42, 0x84, 0x42, 0x84, 0x42,
0x84, 0x42, 0x82, 0x82, 0x41, 0x04, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'VI', 15x15px
const unsigned char epd_bitmap_VI [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x51, 0x74, 0x91, 0x22, 0x91, 0x22, 0x91, 0x22,
0x91, 0x22, 0x8a, 0x22, 0x44, 0x74, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'X', 15x15px
const unsigned char epd_bitmap_X [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x44, 0x44, 0x84, 0x42, 0x82, 0x82, 0x81, 0x02,
0x82, 0x82, 0x84, 0x42, 0x44, 0x44, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'XL', 25x13px
const unsigned char epd_bitmap_XL [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0x22, 0x00, 0x80,
0x80, 0x22, 0x00, 0x80, 0x80, 0x14, 0x00, 0x80, 0x80, 0x08, 0x00, 0x80, 0x80, 0x14, 0x00, 0x80,
0x80, 0x22, 0x00, 0x80, 0x80, 0x22, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// 'Y', 15x15px
const unsigned char epd_bitmap_Y [] PROGMEM = {
0x07, 0xc0, 0x18, 0x30, 0x20, 0x08, 0x40, 0x04, 0x44, 0x44, 0x84, 0x42, 0x82, 0x82, 0x81, 0x02,
0x81, 0x02, 0x81, 0x02, 0x41, 0x04, 0x40, 0x04, 0x20, 0x08, 0x18, 0x30, 0x07, 0xc0
};
// 'Z', 25x13px
const unsigned char epd_bitmap_Z [] PROGMEM = {
0x1f, 0xff, 0xfc, 0x00, 0x60, 0x00, 0x03, 0x00, 0x40, 0x00, 0x01, 0x00, 0x80, 0x3e, 0x00, 0x80,
0x80, 0x02, 0x00, 0x80, 0x80, 0x04, 0x00, 0x80, 0x80, 0x1c, 0x00, 0x80, 0x80, 0x10, 0x00, 0x80,
0x80, 0x20, 0x00, 0x80, 0x80, 0x3e, 0x00, 0x80, 0x40, 0x00, 0x01, 0x00, 0x60, 0x00, 0x03, 0x00,
0x1f, 0xff, 0xfc, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 3104)
const int epd_bitmap_allArray_LEN = 36;
const unsigned char* epd_bitmap_allArray[36] = {
epd_bitmap_1,
epd_bitmap_2,
epd_bitmap_A,
epd_bitmap_B,
epd_bitmap_C,
epd_bitmap_D,
epd_bitmap_DPAD_Down,
epd_bitmap_DPAD_Down_Left,
epd_bitmap_DPAD_Down_Right,
epd_bitmap_DPAD_Left,
epd_bitmap_DPAD_Neutro,
epd_bitmap_DPAD_Right,
epd_bitmap_DPAD_UP,
epd_bitmap_DPAD_UP_Left,
epd_bitmap_DPAD_UP_Right,
epd_bitmap_Home,
epd_bitmap_I,
epd_bitmap_II,
epd_bitmap_III,
epd_bitmap_IV,
epd_bitmap_L,
epd_bitmap_L_,
epd_bitmap_Mode,
epd_bitmap_Pause,
epd_bitmap_R,
epd_bitmap_RUN,
epd_bitmap_Reset,
epd_bitmap_S_,
epd_bitmap_Select,
epd_bitmap_Start,
epd_bitmap_V,
epd_bitmap_VI,
epd_bitmap_X,
epd_bitmap_XL,
epd_bitmap_Y,
epd_bitmap_Z
};
//Fim Imagens
int Option=0; //Change Layout of System (NES, SNES, Genesis (Mega Drive), Master System, TurboGrafx-16 (PC Engine)
String Console[]= {" SNES"," Genesis","NES/GameBoy","Master Sys"," Game Gear"," PC Engine"," Neo Geo","GB Advance","Nintendo DS"};
/*String Cmd1 = "X";
String Cmd2 = "A";
String Cmd3 = "B";
String Cmd4 = "Y";
String CmdL = "L";
String CmdR = "R";
String CmdSL = "Select";
String CmdST = "Start";*/
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // Address 0x3D for 128x64
Serial.println(F("SSD1306 allocation failed"));
for (;;);
}
display.clearDisplay();
//display.setCursor(1, 1);
//display.setTextSize(1);
//display.setTextColor(WHITE);
//display.print(F("Joypad Arduino"));
//display.setRotation(2); //rotates text on OLED 1=90 degrees, 2=180 degrees
display.display();
pinMode(LeftBtn, INPUT_PULLUP); // Joy Left (Arduino Pro Micro Pin 21 (A3))
pinMode(UpBtn, INPUT_PULLUP); // Joy Up (Arduino Pro Micro Pin 20 (A2))
pinMode(RightBtn, INPUT_PULLUP); // Joy Right (Arduino Pro Micro Pin 19 (A1))
pinMode(DowntBtn, INPUT_PULLUP); // Joy Down (Arduino Pro Micro Pin 18 (A0))
pinMode(Btn1, INPUT_PULLUP); // Key 1 (Arduino Pro Micro Pin 15)
pinMode(Btn2, INPUT_PULLUP); // Key 2 (Arduino Pro Micro Pin 14)
pinMode(Btn3, INPUT_PULLUP); // Key 3 (Arduino Pro Micro Pin 16)
pinMode(Btn4, INPUT_PULLUP); // Key 4 (Arduino Pro Micro Pin 10)
pinMode(BtnL, INPUT_PULLUP); //Key L (Arduino Pro Micro Pin 9)
pinMode(BtnR, INPUT_PULLUP); //Key R (Arduino Pro Micro Pin 8)
pinMode(BtnSL, INPUT_PULLUP); //Key Select (Arduino Pro Micro Pin 7)
pinMode(BtnST, INPUT_PULLUP); //Key Start (Arduino Pro Micro Pin 6)
pinMode(BtnHome, INPUT_PULLUP); //Key Home (Arduino Pro Micro Pin 5)
pinMode(BtnOption, INPUT_PULLUP); //Key Option (Arduino Pro Micro Pin 4)
Option=0;
}
void loop() {
// put your main code here, to run repeatedly:
display.clearDisplay();
display.setTextSize(1);
display.setTextColor(WHITE);
display.setCursor(30, 1);
display.setTextSize(1);
display.setTextColor(WHITE);
display.print(Console[Option]);
/*
display.drawBitmap(4, 30, epd_bitmap_Esquerda1, 11, 11, WHITE);
display.drawBitmap(24, 30, epd_bitmap_Direita1, 11, 11, WHITE);
display.drawBitmap(14, 30-11, epd_bitmap_Cima1, 11, 11, WHITE);
display.drawBitmap(14, 30+11, epd_bitmap_Baixo1, 11, 11, WHITE);
*/
// display.drawBitmap(6, 19, epd_bitmap_DPAD_Neutro, 26, 26, WHITE);
//display.setCursor(30, 55);
//display.print(CmdSL);
//display.setCursor(80, 55);
//display.print(CmdST);
/*display.drawCircle(92, 29, 7, WHITE);
//display.setCursor(92-2, 29-3);
//display.print(Cmd4);
display.drawCircle(92+20, 29-5, 7, WHITE);
//display.setCursor((92-2)+20, (29-3)-5);
//display.print(Cmd1);
display.drawCircle(92+8, 29+15, 7, WHITE);
//display.setCursor((92-2)+8, (29-3)+15);
//display.print(Cmd3);
display.drawCircle(92+28, 29+10, 7, WHITE);
//display.setCursor((92-2)+28, (29-3)+10);
//display.print(Cmd2);
display.drawRoundRect(1, 3, 25, 13, 4, WHITE);
//display.setCursor(12, 6);
//display.print(CmdL);
display.drawRoundRect(96, 3, 25, 13, 4, WHITE);
//display.setCursor(106, 6);
//display.print(CmdR);*/
switch(Option){
case 0:
{// SNES
display.drawBitmap(105, 17, epd_bitmap_X, 15, 15, WHITE);//Cmd1
display.drawBitmap(113, 32, epd_bitmap_A, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_B, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_Y, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_R, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 1:
{ // Genesis
display.drawBitmap(105, 17, epd_bitmap_Y, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_C, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_B, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_A, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_XL, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_Z, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Mode, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 2:
{ // NES/GameBoy
display.drawBitmap(105, 17, epd_bitmap_A, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_B, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_A, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_B, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 3:
{ // Master System
display.drawBitmap(105, 17, epd_bitmap_2, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_1, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_2, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_1, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Reset, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Pause, 46, 11, WHITE);
break;
}
case 4:
{ // Game Gear
display.drawBitmap(105, 17, epd_bitmap_2, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_1, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_2, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_1, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_S_, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 5:
{ // PC Engine
display.drawBitmap(105, 17, epd_bitmap_VI, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_I, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_II, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_V, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_IV, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_III, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_RUN, 46, 11, WHITE);
break;
}
case 6:
{ // Neo Geo
display.drawBitmap(105, 17, epd_bitmap_C, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_D, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_B, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_A, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_L_, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 7:
{ // GB Advance
display.drawBitmap(105, 17, epd_bitmap_A, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_B, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_A, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_B, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_R, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
case 8:
{ // Nintendo DS
display.drawBitmap(105, 17, epd_bitmap_X, 15, 15, WHITE);
display.drawBitmap(113, 32, epd_bitmap_A, 15, 15, WHITE);//Cmd2
display.drawBitmap(93, 37, epd_bitmap_B, 15, 15, WHITE);//Cmd3
display.drawBitmap(85, 22, epd_bitmap_Y, 15, 15, WHITE);//Cmd4
display.drawBitmap(1, 3, epd_bitmap_L, 25, 13, WHITE);//CmdL
display.drawBitmap(96, 3, epd_bitmap_R, 25, 13, WHITE);//CmdR
display.drawBitmap(25, 53, epd_bitmap_Select, 46, 11, WHITE);
display.drawBitmap(80-2, 53, epd_bitmap_Start, 46, 11, WHITE);
break;
}
}
if(!digitalRead(BtnSL)){ //Key Select
//Select
display.fillRect(25, 53, 46, 11, INVERSE);
}
if(!digitalRead(BtnST)){ //Key Start
//Start
display.fillRect(80-2, 53, 46, 11, INVERSE);
}
if(!digitalRead(Btn4)){ // Key 4
//4
display.fillCircle(92, 29, 7, INVERSE);
}
if(!digitalRead(Btn1)){ // Key 1
//1
display.fillCircle(92+20, 29-5, 7, INVERSE);
}
if(!digitalRead(Btn3)){ // Key 3
//3
display.fillCircle(92+8, 29+15, 7, INVERSE);
}
if(!digitalRead(Btn2)){ // Key 2
//2
display.fillCircle(92+28, 29+10, 7, INVERSE);
}
if(!digitalRead(BtnL)){ //Key L
//L
display.fillRoundRect(1, 3, 25, 13, 4, INVERSE);
}
if(!digitalRead(BtnR)){ //Key R
//R
display.fillRoundRect(96, 3, 25, 13, 4, INVERSE);
}
//Direcionais
if (!digitalRead(DowntBtn) && !digitalRead(LeftBtn)) {
display.drawBitmap(6, 19, epd_bitmap_DPAD_Down_Left, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_DOWN_LEFT);
}
else if (!digitalRead(DowntBtn) && !digitalRead(RightBtn)) {
display.drawBitmap(6, 19, epd_bitmap_DPAD_Down_Right, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_DOWN_RIGHT);
}
else if (!digitalRead(UpBtn) && !digitalRead(LeftBtn)) {
display.drawBitmap(6, 19, epd_bitmap_DPAD_UP_Left, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_UP_LEFT);
}
else if (!digitalRead(UpBtn) && !digitalRead(RightBtn)) {
display.drawBitmap(6, 19, epd_bitmap_DPAD_UP_Right, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_UP_RIGHT);
}
else if (!digitalRead(LeftBtn)) { // Joy Left
display.drawBitmap(6, 19, epd_bitmap_DPAD_Left, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_LEFT);
}
else if (!digitalRead(RightBtn)) { // Joy Right
display.drawBitmap(6, 19, epd_bitmap_DPAD_Right, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_RIGHT);
}
else if (!digitalRead(UpBtn)) { // Joy Up
display.drawBitmap(6, 19, epd_bitmap_DPAD_UP, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_UP);
}
else if (!digitalRead(DowntBtn)) { // Joy Down
display.drawBitmap(6, 19, epd_bitmap_DPAD_Down, 26, 26, WHITE);
//Gamepad.dPad1(GAMEPAD_DPAD_DOWN);
}
else {
display.drawBitmap(6, 19, epd_bitmap_DPAD_Neutro, 26, 26, WHITE);
}
if (!digitalRead(BtnOption)) { //Key Option
if (Option>7){Option=-1;}
Option++;
Serial.println(Option);
delay(200); // Debounce
}
display.display();
}