#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h> // Library OLED
// Battery Level Image
// 'batt0', 29x14px
const unsigned char bitmap_batt_0 [] 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
};
// ' batt1', 29x14px
const unsigned char bitmap_batt_1 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x00, 0x20,
0x08, 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x20, 0x18, 0x00, 0x00, 0x20,
0x18, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xff, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' batt2', 29x14px
const unsigned char bitmap_batt_2 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x00, 0x20,
0x08, 0x00, 0x07, 0xa0, 0x18, 0x00, 0x07, 0xa0, 0x18, 0x00, 0x07, 0xa0, 0x18, 0x00, 0x07, 0xa0,
0x18, 0x00, 0x07, 0xa0, 0x08, 0x00, 0x07, 0xa0, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xff, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' batt3', 29x14px
const unsigned char bitmap_batt_3 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x00, 0x20,
0x08, 0x00, 0xf7, 0xa0, 0x18, 0x00, 0xf7, 0xa0, 0x18, 0x00, 0xf7, 0xa0, 0x18, 0x00, 0xf7, 0xa0,
0x18, 0x00, 0xf7, 0xa0, 0x08, 0x00, 0xf7, 0xa0, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xff, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' batt4', 29x14px
const unsigned char bitmap_batt_4 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x00, 0x20,
0x08, 0x1e, 0xf7, 0xa0, 0x18, 0x1e, 0xf7, 0xa0, 0x18, 0x1e, 0xf7, 0xa0, 0x18, 0x1e, 0xf7, 0xa0,
0x18, 0x1e, 0xf7, 0xa0, 0x08, 0x1e, 0xf7, 0xa0, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xff, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' batt5', 29x14px
const unsigned char bitmap_batt_5 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xe0, 0x08, 0x00, 0x00, 0x20,
0x0b, 0xde, 0xf7, 0xa0, 0x1b, 0xde, 0xf7, 0xa0, 0x1b, 0xde, 0xf7, 0xa0, 0x1b, 0xde, 0xf7, 0xa0,
0x1b, 0xde, 0xf7, 0xa0, 0x0b, 0xde, 0xf7, 0xa0, 0x08, 0x00, 0x00, 0x20, 0x0f, 0xff, 0xff, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// Array Battery Level
const unsigned char* bitmap_batt[6] = {
bitmap_batt_0,
bitmap_batt_1,
bitmap_batt_2,
bitmap_batt_3,
bitmap_batt_4,
bitmap_batt_5
};
//Option Menu Image
// ' display_op', 128x23px
const unsigned char bitmap_display_op [] 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, 0x7c, 0x10, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xff, 0x80, 0xce, 0x30, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0xc7, 0x20, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x03, 0x40, 0xc3, 0x01, 0xe0, 0xe1, 0x87, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x01, 0x40, 0xc3, 0x13, 0x31, 0x71, 0x8f, 0x8c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0xc3, 0x33, 0x83, 0x39, 0x91, 0x9c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0xc3, 0x71, 0xc7, 0x19, 0x87, 0x8c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0xc2, 0x30, 0xe3, 0x19, 0x89, 0x8c, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x00, 0x40, 0xc4, 0x32, 0x73, 0x99, 0x99, 0x8d, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xff, 0x80, 0xc8, 0x3b, 0x33, 0xd1, 0x99, 0x8e, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xf8, 0x00, 0xf0, 0x31, 0xe3, 0x61, 0x8f, 0x80, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x07, 0xff, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' notif_bar', 128x16px
const unsigned char bitmap_notif_bar [] 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,
0x07, 0xf3, 0xfe, 0x7f, 0x01, 0xe7, 0xf3, 0xfe, 0xf7, 0xbf, 0xef, 0xf8, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x7b, 0xc0, 0xf7, 0x81, 0xef, 0x7b, 0xc0, 0xf7, 0xbc, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x7b, 0xc0, 0xf7, 0x81, 0xef, 0x7b, 0xc0, 0xf7, 0xbc, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xfb, 0xc0, 0xf7, 0x81, 0xef, 0xfb, 0xc0, 0xfe, 0x3f, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0xfb, 0xc0, 0xf7, 0x81, 0xef, 0xfb, 0xc0, 0xff, 0x3f, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x7b, 0xc0, 0xf7, 0x81, 0xef, 0x7b, 0xc0, 0xf7, 0xbc, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x7b, 0xfc, 0xff, 0xbf, 0xef, 0x7b, 0xfc, 0xf7, 0xbf, 0xc3, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x0f, 0x7b, 0xfe, 0x7f, 0x3f, 0xcf, 0x7b, 0xfe, 0xf7, 0xbf, 0xe3, 0xc0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' scroll_bar', 5x49px
const unsigned char bitmap_scroll_bar [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00,
0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x00, 0x00,
0x00
};
// ' select', 128x23px
const unsigned char bitmap_select [] 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,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x86,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66,
0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe6,
0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc6,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' setting_op', 128x25px
const unsigned char bitmap_setting_op [] 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, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x50, 0x00, 0x1c, 0x00, 0x10, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0xdb, 0x00, 0x2f, 0x00, 0x30, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x05, 0x00, 0x46, 0x00, 0x71, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x02, 0x00, 0xc0, 0x1e, 0x30, 0xc0, 0x09, 0xc3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x71, 0x00, 0xfc, 0x27, 0x7d, 0xf1, 0x1a, 0xc5, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1c, 0x89, 0xc0, 0x7e, 0x62, 0x30, 0xc3, 0x3c, 0xcc, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x10, 0x88, 0x40, 0x07, 0x64, 0x30, 0xc7, 0x18, 0xcc, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1c, 0x89, 0xc0, 0x03, 0x68, 0x30, 0xc3, 0x18, 0xcc, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x04, 0x71, 0x00, 0xc2, 0x70, 0x34, 0xd3, 0x18, 0xcc, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x02, 0x00, 0xe4, 0x71, 0x38, 0xe3, 0x18, 0xc6, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x05, 0x05, 0x00, 0x78, 0x3e, 0x30, 0xc3, 0x18, 0xc3, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x06, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// Display Menu Image
// Major_Number
// ' main_0', 24x36px
const unsigned char bitmap_main_0 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x03, 0xff, 0xfc, 0x07, 0xff, 0xfc, 0x0f,
0xff, 0xfc, 0x1f, 0xff, 0xfc, 0x1f, 0xff, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1,
0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc,
0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f,
0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1, 0xfc, 0x1f, 0xc1,
0xfc, 0x1f, 0xff, 0xfc, 0x1f, 0xff, 0xfc, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xe0,
0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_2', 24x36px
const unsigned char bitmap_main_2 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x01, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x07,
0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1,
0xf8, 0x00, 0x01, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x07, 0xf8, 0x00, 0x0f, 0xf8, 0x00, 0x1f, 0xf8,
0x00, 0x3f, 0xf0, 0x00, 0x7f, 0xe0, 0x00, 0xff, 0x80, 0x01, 0xff, 0x00, 0x03, 0xfe, 0x00, 0x07,
0xfc, 0x00, 0x0f, 0xf8, 0x00, 0x0f, 0xf0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0,
0x00, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8,
0x0f, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_1', 24x36px
const unsigned char bitmap_main_1 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0xff, 0x80, 0x01, 0xff, 0x80, 0x03,
0xff, 0x80, 0x07, 0xff, 0x80, 0x07, 0xff, 0x80, 0x07, 0xff, 0x80, 0x03, 0xff, 0x80, 0x00, 0x7f,
0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80,
0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00,
0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f,
0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80,
0x00, 0x3f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_3', 24x36px
const unsigned char bitmap_main_3 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x0f,
0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0x81, 0xf8, 0x1f, 0x81, 0xf8, 0x1f, 0x81,
0xf8, 0x1f, 0x81, 0xf8, 0x00, 0x01, 0xf8, 0x00, 0x01, 0xf8, 0x00, 0x0f, 0xf8, 0x00, 0x0f, 0xf0,
0x00, 0x0f, 0xc0, 0x00, 0x0f, 0xf8, 0x00, 0x0f, 0xfc, 0x00, 0x0f, 0xfc, 0x00, 0x03, 0xfc, 0x00,
0x01, 0xfc, 0x00, 0x01, 0xfc, 0x1f, 0x81, 0xfc, 0x1f, 0x81, 0xfc, 0x1f, 0x81, 0xfc, 0x1f, 0x81,
0xfc, 0x1f, 0xff, 0xfc, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xe0,
0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_4', 24x36px
const unsigned char bitmap_main_4 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x07, 0xc0, 0x00, 0x0f, 0xe0, 0x00,
0x1f, 0xf0, 0x00, 0x1f, 0xf8, 0x00, 0x3f, 0xf8, 0x00, 0x3f, 0xf8, 0x00, 0x7f, 0xf8, 0x00, 0x7f,
0xf8, 0x00, 0xff, 0xf8, 0x00, 0xff, 0xf8, 0x01, 0xfb, 0xf8, 0x01, 0xfb, 0xf8, 0x03, 0xf3, 0xf8,
0x03, 0xf3, 0xf8, 0x07, 0xe3, 0xf8, 0x07, 0xe3, 0xf8, 0x0f, 0xc3, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f,
0xc3, 0xfe, 0x0f, 0xff, 0xfe, 0x0f, 0xff, 0xfe, 0x07, 0xff, 0xfe, 0x07, 0xff, 0xfe, 0x03, 0xff,
0xfe, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8,
0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_5', 24x36px
const unsigned char bitmap_main_5 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f,
0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf0, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0,
0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xff, 0x80, 0x0f, 0xff, 0xc0, 0x0f, 0xff, 0xe0,
0x0f, 0xff, 0xf0, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x00, 0x01, 0xf8, 0x00,
0x01, 0xf8, 0x00, 0x01, 0xf8, 0x0f, 0xc1, 0xf8, 0x0f, 0xc1, 0xf8, 0x0f, 0xc1, 0xf8, 0x0f, 0xc1,
0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x01, 0xff, 0xf8,
0x00, 0xff, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_6', 24x36px
const unsigned char bitmap_main_6 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x01, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x07,
0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1,
0xf8, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8,
0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xe3, 0xf8, 0x0f,
0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1, 0xf8, 0x0f, 0xe1,
0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x0f, 0xff, 0xf0, 0x0f, 0xff, 0xc0,
0x0f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_7', 24x36px
const unsigned char bitmap_main_7 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x1f, 0xff, 0xc0, 0x1f, 0xff, 0xe0, 0x1f,
0xff, 0xf0, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x87, 0xf0, 0x1f, 0x87,
0xf0, 0x00, 0x07, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xe0, 0x00, 0x0f, 0xc0, 0x00, 0x1f, 0xc0,
0x00, 0x1f, 0xc0, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x3f, 0x80, 0x00, 0x7f, 0x00, 0x00,
0x7f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 0x00, 0x01, 0xfc, 0x00, 0x01, 0xfc,
0x00, 0x01, 0xfc, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x03, 0xf8, 0x00, 0x07, 0xf0, 0x00,
0x07, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_8', 24x36px
const unsigned char bitmap_main_8 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x0f,
0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83,
0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xe0,
0x1f, 0xff, 0x80, 0x03, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x0f, 0xff, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f,
0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83,
0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xe0, 0x1f, 0xff, 0xc0,
0x1f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' main_9', 24x36px
const unsigned char bitmap_main_9 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x03, 0xff, 0xf8, 0x07, 0xff, 0xf8, 0x0f,
0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f, 0xc3,
0xf8, 0x1f, 0xc3, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f, 0xc3, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8,
0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x00, 0x07, 0xf8, 0x00,
0x03, 0xf8, 0x00, 0x03, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83, 0xf8, 0x1f, 0x83,
0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xf0, 0x1f, 0xff, 0xe0, 0x1f, 0xff, 0xc0,
0x1f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 1280)
const unsigned char* bitmap_main_num[10] = {
bitmap_main_0,
bitmap_main_1,
bitmap_main_2,
bitmap_main_3,
bitmap_main_4,
bitmap_main_5,
bitmap_main_6,
bitmap_main_7,
bitmap_main_8,
bitmap_main_9
};
//Minor_Number
// ' sub_0', 8x12px
const unsigned char bitmap_sub_0 [] PROGMEM = {
0x00, 0x00, 0x3e, 0x63, 0x67, 0x6f, 0x7b, 0x73, 0x63, 0x3e, 0x00, 0x00
};
// ' sub_1', 8x12px
const unsigned char bitmap_sub_1 [] PROGMEM = {
0x00, 0x00, 0x0c, 0x1c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00
};
// ' sub_2', 8x12px
const unsigned char bitmap_sub_2 [] PROGMEM = {
0x00, 0x00, 0x3e, 0x63, 0x03, 0x3e, 0x60, 0x60, 0x63, 0x7f, 0x00, 0x00
};
// ' sub_3', 8x12px
const unsigned char bitmap_sub_3 [] PROGMEM = {
0x00, 0x00, 0x7f, 0x06, 0x0c, 0x1e, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00
};
// ' sub_4', 8x12px
const unsigned char bitmap_sub_4 [] PROGMEM = {
0x00, 0x00, 0x0f, 0x1b, 0x33, 0x63, 0x7f, 0x03, 0x03, 0x03, 0x00, 0x00
};
// ' sub_5', 8x12px
const unsigned char bitmap_sub_5 [] PROGMEM = {
0x00, 0x00, 0x7e, 0x60, 0x60, 0x7e, 0x03, 0x03, 0x63, 0x3e, 0x00, 0x00
};
// ' sub_6', 8x12px
const unsigned char bitmap_sub_6 [] PROGMEM = {
0x00, 0x00, 0x3e, 0x63, 0x60, 0x7e, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00
};
// ' sub_7', 8x12px
const unsigned char bitmap_sub_7 [] PROGMEM = {
0x00, 0x00, 0x7f, 0x63, 0x06, 0x0c, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00
};
// ' sub_8', 8x12px
const unsigned char bitmap_sub_8 [] PROGMEM = {
0x00, 0x00, 0x3e, 0x63, 0x63, 0x3e, 0x63, 0x63, 0x63, 0x3e, 0x00, 0x00
};
// ' sub_9', 8x12px
const unsigned char bitmap_sub_9 [] PROGMEM = {
0x00, 0x00, 0x3e, 0x63, 0x63, 0x63, 0x3f, 0x03, 0x63, 0x3e, 0x00, 0x00
};
const unsigned char* bitmap_sub_num[10] = {
bitmap_sub_0,
bitmap_sub_1,
bitmap_sub_2,
bitmap_sub_3,
bitmap_sub_4,
bitmap_sub_5,
bitmap_sub_6,
bitmap_sub_7,
bitmap_sub_8,
bitmap_sub_9
};
// ' main_degree', 32x48px
const unsigned char bitmap_main_degree [] 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,
0x1f, 0x00, 0x7f, 0xe0, 0x3f, 0x80, 0xff, 0xe0, 0x71, 0xc1, 0xff, 0xe0, 0x60, 0xc3, 0xff, 0xe0,
0x60, 0xc7, 0xff, 0xe0, 0x60, 0xc7, 0xe3, 0xe0, 0x60, 0xc7, 0xe3, 0xe0, 0x71, 0xc7, 0xe3, 0xe0,
0x3f, 0x87, 0xe3, 0xe0, 0x1f, 0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00,
0x00, 0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00,
0x00, 0x07, 0xe3, 0xe0, 0x00, 0x07, 0xe3, 0xe0, 0x00, 0x07, 0xe3, 0xe0, 0x00, 0x07, 0xff, 0xe0,
0x00, 0x07, 0xff, 0xe0, 0x00, 0x07, 0xff, 0xc0, 0x00, 0x07, 0xff, 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
};
// ' sub_degree', 16x11px
const unsigned char bitmap_sub_degree [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x48, 0x00, 0x31, 0xf0, 0x03, 0x18, 0x03, 0x00, 0x03, 0x18,
0x01, 0xf0, 0x00, 0x00, 0x00, 0x00
};
// 'relay_bg', 24x19px
const unsigned char bitmap_relay_bg [] 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
};
// 'sun_icon', 24x19px
const unsigned char bitmap_sun_icon [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x38, 0x00, 0x06, 0x7c, 0xc0, 0x07,
0x01, 0xc0, 0x02, 0x7c, 0x80, 0x00, 0xfe, 0x00, 0x05, 0xff, 0x40, 0x0d, 0xff, 0x60, 0x1d, 0xff,
0x70, 0x0d, 0xff, 0x60, 0x05, 0xff, 0x40, 0x00, 0xfe, 0x00, 0x02, 0x7c, 0x80, 0x07, 0x01, 0xc0,
0x06, 0x7c, 0xc0, 0x00, 0x38, 0x00, 0x00, 0x10, 0x00
};
// 'snowflake_icon', 24x20px
const unsigned char bitmap_snowflake_icon [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x01, 0x39, 0x00, 0x05, 0x11, 0x40, 0x02,
0x54, 0x80, 0x0d, 0x11, 0x60, 0x00, 0xba, 0x00, 0x12, 0x44, 0x90, 0x08, 0x82, 0x20, 0x1f, 0x83,
0xf0, 0x08, 0x82, 0x20, 0x12, 0x44, 0x90, 0x00, 0xba, 0x00, 0x0d, 0x11, 0x60, 0x02, 0x54, 0x80,
0x05, 0x11, 0x40, 0x01, 0x39, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00
};
//Array Notif Relay
const unsigned char* bitmap_relay_notif[3] = {
bitmap_relay_bg,
bitmap_snowflake_icon,
bitmap_sun_icon
};
// Setting Menu Image
// 'Main_Setting', 112x43px
const unsigned char bitmap_main_setting [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x80, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x9b, 0x8d, 0xc3, 0xc7, 0xc0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x9f, 0xcf, 0xe7, 0xe7, 0xe0, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x61, 0x9c, 0xce, 0x66, 0x66, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x61, 0x98, 0xcc, 0x67, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x61, 0x98, 0xcc, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x9c,
0xce, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x9f, 0xcf, 0xe7,
0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x1b, 0x8d, 0xc3, 0xc6, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 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, 0x60, 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, 0x60, 0x3c, 0x66, 0x63, 0xc7, 0xc0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x7e, 0x66, 0x67, 0xe7, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x66, 0x66, 0x66, 0x66, 0x60, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0x66, 0x66, 0x67, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x60, 0x66, 0x66, 0x66, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x60, 0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e,
0x7f, 0xe7, 0xe6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x3c, 0x3f, 0xe3,
0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x3e, 0x3f, 0x67, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x7c, 0x7c, 0x66, 0x7c, 0x63, 0x03, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xc0, 0x06, 0x66, 0xc6, 0x63, 0x3f, 0x60, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7e,
0x66, 0xfe, 0x63, 0x63, 0x60, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xc6, 0x3c, 0xc0,
0x3e, 0x3f, 0x3f, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x7e, 0x18, 0x7c, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// ' arrow', 8x9px
const unsigned char bitmap_arrow [] PROGMEM = {
0x00, 0x00, 0x20, 0x30, 0x38, 0x30, 0x20, 0x00, 0x00
};
// 'arrow_right 2', 8x10px
const unsigned char bitmap_arrow_right [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x20, 0x30, 0x38, 0x30, 0x20, 0x00
};
// 'arrow_left 2', 8x10px
const unsigned char bitmap_arrow_left [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x04, 0x0c, 0x1c, 0x0c, 0x04, 0x00
};
// 'border', 32x19px
const unsigned char bitmap_border [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40,
0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40,
0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
//Manual Menu
// ' OFF', 32x12px
const unsigned char bitmap_OFF [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x10, 0x00, 0x00, 0x08, 0x26, 0x7b, 0xc3, 0xe4,
0x29, 0x42, 0x07, 0x74, 0x29, 0x73, 0x86, 0xb4, 0x29, 0x42, 0x06, 0xb4, 0x29, 0x42, 0x07, 0x74,
0x26, 0x42, 0x03, 0xe4, 0x10, 0x00, 0x00, 0x08, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00
};
// ' ON', 32x12px
const unsigned char bitmap_ON [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x10, 0x00, 0x00, 0x08, 0x27, 0xc0, 0x32, 0x44,
0x2e, 0xe0, 0x4b, 0x44, 0x2e, 0xe0, 0x4b, 0x44, 0x2e, 0xe0, 0x4a, 0xc4, 0x2e, 0xe0, 0x4a, 0x44,
0x27, 0xc0, 0x32, 0x44, 0x10, 0x00, 0x00, 0x08, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 128)
const unsigned char* bitmap_OnOff[2] = {
bitmap_OFF,
bitmap_ON
};
// ' manual', 120x44px
const unsigned char bitmap_manual [] PROGMEM = {
0x18, 0x60, 0x00, 0x06, 0x01, 0xf8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0x60, 0x00, 0x06, 0x01, 0xfc, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x60,
0x00, 0x06, 0x01, 0x8c, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x63, 0xc3,
0xcf, 0x01, 0x8c, 0x78, 0x76, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe7, 0xe7, 0xef,
0x01, 0x8c, 0xfc, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe6, 0x66, 0x66, 0x01,
0xfc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x67, 0xe6, 0x66, 0x01, 0xf8,
0xcc, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x06, 0x66, 0x01, 0x80, 0xcc,
0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x66, 0x66, 0x01, 0x80, 0xcc, 0xce,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x67, 0xe7, 0xe7, 0x01, 0x80, 0xfc, 0xfe, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x63, 0xc3, 0xe3, 0x01, 0x80, 0x7c, 0x76, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0f, 0x80, 0x00, 0x0c, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x1f, 0xc0, 0x00, 0x0c, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
0xc0, 0x00, 0x0c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x07,
0x87, 0x8c, 0x03, 0x01, 0xe3, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0f, 0xcf,
0xcc, 0x03, 0xf3, 0xf3, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xcc, 0xcc,
0x03, 0xf3, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xcc, 0xcc, 0x03,
0x03, 0x33, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xcc, 0xcc, 0x03, 0x03,
0x33, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xcc, 0xcc, 0xcc, 0x03, 0x03, 0x33,
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xcf, 0xcf, 0xcc, 0x03, 0x03, 0xf3, 0x30,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x87, 0x87, 0x8c, 0x03, 0x01, 0xf3, 0x30, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c,
0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0c, 0x00,
0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0xc7, 0xc7,
0xec, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x78, 0xf8, 0xf9, 0xe0, 0x0c, 0x60, 0x6c, 0x0f,
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0xc5, 0x81, 0x8d, 0xc0, 0x0c, 0x67, 0xec, 0x0f, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xfc, 0xf9, 0xfc, 0xc0, 0x0c, 0x6c, 0x6c, 0x0d, 0xc0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0x0d, 0x80, 0xc8, 0x07, 0xc7, 0xe7, 0xec, 0xe0, 0x00, 0x00,
0x00, 0x00, 0x00, 0x60, 0x79, 0xf8, 0xf8, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
#define OLED_RESET -1 // Reset OLED (jika tidak digunakan, set -1)
#define SCREEN_WIDTH 128 // Lebar OLED dalam piksel
#define SCREEN_HEIGHT 64 // Tinggi OLED dalam piksel
#define SCREEN_ADDRESS 0x3C
#define BUTTON_UP_PIN 25 // pin for UP button
#define BUTTON_SELECT_PIN 27 // pin for SELECT button
#define BUTTON_DOWN_PIN 26 // pin for DOWN button
#define RELAY_FAN 6
#define RELAY_PAD 7
#define CHARGE 13 // pin for Detect Charging
#define BATTERY_LEVEL 14 // pin for Detect Voltage
boolean button_up_clicked = 0; // only perform action when button is clicked, and wait until another press
boolean button_select_clicked = 0; // same as above
boolean button_down_clicked = 0; // same as above
// Inisialisasi objek OLED
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
//All Display
word batt_bar;
int selection = 16;
word menu = 8;
int a = 590;
//Display_menu
word relay_stats;
int temp = 27; // current temp
char temp_string[10]; // temp number value converted to c-style string (array of characters)
int temp_string_length; // length of the temp_string
int upper_temp = 26;//Default Upper
char upper_temp_string[10]; // temp number value converted to c-style string (array of characters)
int upper_temp_string_length; // length of the temp_string
int lower_temp = 18;//Default Lower
char lower_temp_string[10]; // temp number value converted to c-style string (array of characters)
int lower_temp_string_length; // length of the temp_string
//Option Menu
boolean slct = true;
//Setting Menu
int arrow_posx=3;
int arrow_posy=19;
int sub_menu=1;
int arrow_pos =1 ;
int arrow_left_posx = 83;
int arrow_right_posx = 112;
//Manual Menu
int arrow_posx1=3;
int arrow_posy1 =19;
int arrow_pos1 =1;
boolean cool_stats,heat_stats=false;
//saving
int p1 =0;
void battery_display(){
if(digitalRead(CHARGE)==LOW){
if ((analogRead(BATTERY_LEVEL)<=4095 ) && (analogRead(BATTERY_LEVEL)>(4095-a))) {charge_bar_5();}
else if ((analogRead(BATTERY_LEVEL)<=(4095-a) ) && (analogRead(BATTERY_LEVEL)>(4095-(2*a)))) {charge_bar_4();}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(2*a))) && (analogRead(BATTERY_LEVEL)>(4095-(3*a)))) {charge_bar_3();}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(3*a))) && (analogRead(BATTERY_LEVEL)>(4095-(4*a)))) {charge_bar_2();}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(4*a))) && (analogRead(BATTERY_LEVEL)>(4095-(5*a)))) {charge_bar_1();}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(5*a))) && (analogRead(BATTERY_LEVEL)>=0)) {charge_bar_0();}
}else{
//Not Charging
if ((analogRead(BATTERY_LEVEL)<=4095 ) && (analogRead(BATTERY_LEVEL)>(4095-a))) {batt_bar=5 ;}
else if ((analogRead(BATTERY_LEVEL)<=(4095-a) ) && (analogRead(BATTERY_LEVEL)>(4095-(2*a)))) {batt_bar=4 ;}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(2*a))) && (analogRead(BATTERY_LEVEL)>(4095-(3*a)))) {batt_bar=3 ;}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(3*a))) && (analogRead(BATTERY_LEVEL)>(4095-(4*a)))) {batt_bar=2 ;}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(4*a))) && (analogRead(BATTERY_LEVEL)>(4095-(5*a)))) {batt_bar=1 ;}
else if ((analogRead(BATTERY_LEVEL)<=(4095-(5*a))) && (analogRead(BATTERY_LEVEL)>=0)) {empty_blink();}
}
}
void StringtoArray(){ //convert String to Array Character
itoa(temp,temp_string,10);
temp_string_length = strlen(temp_string);
//UPPER TEMP INT TO CHAR ARRAY
itoa(upper_temp,upper_temp_string,10);
upper_temp_string_length = strlen(upper_temp_string);
//LOWER TEMP INT TO CHAR ARRAY
itoa(lower_temp,lower_temp_string,10);
lower_temp_string_length = strlen(lower_temp_string);
}
void menu_display() { //Menu Display
for(int i = 0; i < temp_string_length; i++)
display.drawBitmap( (48 - temp_string_length * 22) + 22*i, 22, bitmap_main_num[temp_string[i]-48], 24, 36, SSD1306_WHITE);
for(int j = 0; j < lower_temp_string_length; j++)//103
display.drawBitmap( 93 + 8*j, 18, bitmap_sub_num[lower_temp_string[j]-48], 8, 12,SSD1306_WHITE);
for(int k = 0; k < upper_temp_string_length; k++)//103
display.drawBitmap( 93 + 8*k, 31, bitmap_sub_num[upper_temp_string[k]-48], 8, 12,SSD1306_WHITE);
display.drawBitmap(50, 16,bitmap_main_degree, 32, 48,SSD1306_WHITE );
display.drawBitmap(111, 16,bitmap_sub_degree, 16, 11,SSD1306_WHITE );
display.drawBitmap(111, 28,bitmap_sub_degree, 16, 11,SSD1306_WHITE );
display.drawBitmap(92, 42,bitmap_relay_notif[relay_stats], 24, 20,SSD1306_WHITE );
}
void menu_option() { //Option Display
display.drawBitmap( 123, 15, bitmap_scroll_bar, 8, 64,SSD1306_WHITE);
display.drawBitmap( 0, 16, bitmap_display_op, 128, 23,SSD1306_WHITE);
display.drawBitmap( 0, 39, bitmap_setting_op, 128, 25,SSD1306_WHITE);
display.drawBitmap( 0, selection, bitmap_select, 128, 23,SSD1306_WHITE);
}
void menu_setting() { //Setting Display
display.drawBitmap( 11, 18, bitmap_main_setting, 112, 43,SSD1306_WHITE);
display.drawBitmap( arrow_posx,arrow_posy, bitmap_arrow, 8, 9,SSD1306_WHITE);
for(int j = 0; j < lower_temp_string_length; j++)//103
display.drawBitmap( 93 + 8*j, 34, bitmap_sub_num[lower_temp_string[j]-48], 8, 12,SSD1306_WHITE);
for(int k = 0; k < upper_temp_string_length; k++)//103
display.drawBitmap( 93 + 8*k, 18, bitmap_sub_num[upper_temp_string[k]-48], 8, 12, SSD1306_WHITE);
}
void setting_upper(){
display.drawBitmap( 11, 18, bitmap_main_setting, 112, 43, SSD1306_WHITE);
display.drawBitmap( arrow_right_posx,19, bitmap_arrow_right, 8, 10, SSD1306_WHITE);
display.drawBitmap( 86,15, bitmap_border,32, 19,SSD1306_WHITE);
display.drawBitmap( arrow_left_posx,19, bitmap_arrow_left, 8, 10,SSD1306_WHITE);
display.drawBitmap( arrow_posx,arrow_posy, bitmap_arrow, 8, 9,SSD1306_WHITE);
for(int j = 0; j < lower_temp_string_length; j++)//103
display.drawBitmap( 93 + 8*j, 34, bitmap_sub_num[lower_temp_string[j]-48],8, 12,SSD1306_WHITE);
for(int k = 0; k < upper_temp_string_length; k++)//103
display.drawBitmap( 93 + 8*k, 18, bitmap_sub_num[upper_temp_string[k]-48], 8, 12,SSD1306_WHITE);
}
void setting_lower(){
display.drawBitmap( 11, 18, bitmap_main_setting, 112, 43,SSD1306_WHITE);
display.drawBitmap( arrow_right_posx,34, bitmap_arrow_right, 8, 10,SSD1306_WHITE);
display.drawBitmap( 86,30, bitmap_border, 32, 19, SSD1306_WHITE);
display.drawBitmap( arrow_left_posx,34, bitmap_arrow_left, 8, 10,SSD1306_WHITE );
display.drawBitmap( arrow_posx,arrow_posy, bitmap_arrow, 8, 9, SSD1306_WHITE);
for(int j = 0; j < lower_temp_string_length; j++)//103
display.drawBitmap( 93 + 8*j, 34, bitmap_sub_num[lower_temp_string[j]-48], 8, 12, SSD1306_WHITE);
for(int k = 0; k < upper_temp_string_length; k++)//103
display.drawBitmap( 93 + 8*k, 18, bitmap_sub_num[upper_temp_string[k]-48], 8, 12,SSD1306_WHITE);
}
void saving_display() {
// Clear the buffer.
display.setTextColor(WHITE);
display.drawRect(12, 36, 104, 12, WHITE);
display.fillRect(14, 38, p1 , 8, WHITE);
display.setCursor(34, 27);
display.setTextSize(1);
display.print("Saving: ");
display.print(p1);
display.print("%");
}
void manual(){
display.drawBitmap( 8, 19, bitmap_manual, 120, 44,SSD1306_WHITE);
display.drawBitmap( 88, 19, bitmap_OnOff[heat_stats], 32, 12,SSD1306_WHITE);
display.drawBitmap( 88, 34, bitmap_OnOff[cool_stats], 32, 12,SSD1306_WHITE);
display.drawBitmap( arrow_posx1,arrow_posy1, bitmap_arrow, 8, 9, SSD1306_WHITE);
}
void empty_blink(){
if (millis()%500<250){
batt_bar=0;
}
if (millis()%1000<500){
batt_bar=1;
}
}
void charge_bar_0(){
if (millis()%200<100){
batt_bar++;
}
if (batt_bar>5){
batt_bar=0;
}
}
void charge_bar_1(){
if (millis()%200<100){
batt_bar++;
}
if (batt_bar>5){
batt_bar=1;
}
}
void charge_bar_2(){
if (millis()%200<100){
batt_bar++;
}
if (batt_bar>5){
batt_bar=2;
}
}
void charge_bar_3(){
if (millis()%200<100){
batt_bar++;
}
if (batt_bar>5){
batt_bar=3;
}
}
void charge_bar_4(){
if (millis()%200<100){
batt_bar++;
}
if (batt_bar>5){
batt_bar=4;
}
}
void charge_bar_5(){
batt_bar=5;
}
void setup() {
pinMode(BUTTON_UP_PIN, INPUT_PULLUP); // up button
pinMode(BUTTON_SELECT_PIN, INPUT_PULLUP); // select button
pinMode(BUTTON_DOWN_PIN, INPUT_PULLUP); // down button
pinMode(CHARGE, INPUT_PULLUP); // Detect Charging
display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS);
// Inisialisasi sensor suhu
display.clearDisplay();
display.display();
display.setTextColor(SSD1306_WHITE);
display.setTextSize(1);
display.setCursor(0,0);
}
void loop() {
if (menu==1){
if(temp>upper_temp){
digitalWrite(RELAY_FAN,HIGH);
digitalWrite(RELAY_PAD,LOW);
relay_stats=1;
}
else if((temp>=lower_temp&&temp<=upper_temp)){
digitalWrite(RELAY_FAN,LOW);
digitalWrite(RELAY_PAD,LOW);
relay_stats=0;
}
else if(temp<lower_temp){
digitalWrite(RELAY_PAD,HIGH);
digitalWrite(RELAY_FAN,LOW);
relay_stats=2;
}
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=2;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (menu==2){
if ((digitalRead(BUTTON_UP_PIN) == LOW) && (button_up_clicked == 0)) { // up button clicked - jump to previous menu item
slct=!slct;
button_up_clicked = 1; }
if ((digitalRead(BUTTON_DOWN_PIN) == LOW) && (button_down_clicked == 0)) { // up button clicked - jump to previous menu item
slct=!slct;
button_down_clicked = 1; }
if ((digitalRead(BUTTON_UP_PIN) == HIGH) && (button_up_clicked == 1)) { // unclick
button_up_clicked = 0;
}
if ((digitalRead(BUTTON_DOWN_PIN) == HIGH) && (button_down_clicked == 1)) { // unclick
button_down_clicked = 0;
}
if (slct==true){
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=1;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
selection=16;
}else{
selection=39;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=3;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
}
if (menu==3){
if ((digitalRead(BUTTON_UP_PIN) == LOW) && (button_up_clicked == 0)) { // up button clicked - jump to previous menu item
arrow_pos--;
button_up_clicked = 1; }
if ((digitalRead(BUTTON_DOWN_PIN) == LOW) && (button_down_clicked == 0)) { // up button clicked - jump to previous menu item
arrow_pos++;
button_down_clicked = 1; }
if ((digitalRead(BUTTON_UP_PIN) == HIGH) && (button_up_clicked == 1)) { // unclick
button_up_clicked = 0;
}
if ((digitalRead(BUTTON_DOWN_PIN) == HIGH) && (button_down_clicked == 1)) { // unclick
button_down_clicked = 0;
}
if (arrow_pos<=0){
arrow_pos=4;
}
if (arrow_pos>=5){
arrow_pos=1;
}
if (arrow_pos==1){
arrow_posx=3;
arrow_posy=19;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=4;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos==2){
arrow_posx=3;
arrow_posy=35;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=5;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos==3){
arrow_posx=3;
arrow_posy=52;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=2;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos==4){
arrow_posx=83;
arrow_posy=52;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
//EEPROM.write(0,upper_temp);
//EEPROM.write(1,lower_temp);
menu=6;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
}
if (menu==4){
if ((digitalRead(BUTTON_UP_PIN) == LOW) && (button_up_clicked == 0)) { // up button clicked - jump to previous menu item
upper_temp++;
arrow_right_posx = 112;
arrow_left_posx = 83;
button_up_clicked = 1; }
if ((digitalRead(BUTTON_DOWN_PIN) == LOW) && (button_down_clicked == 0)) { // up button clicked - jump to previous menu item
upper_temp--;
arrow_right_posx = 112;
arrow_left_posx = 83;
button_down_clicked = 1; }
if ((digitalRead(BUTTON_UP_PIN) == HIGH) && (button_up_clicked == 1)) { // unclick
button_up_clicked = 0;
}
if ((digitalRead(BUTTON_DOWN_PIN) == HIGH) && (button_down_clicked == 1)) { // unclick
button_down_clicked = 0;
}
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=3;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
if (upper_temp<=lower_temp+1){
upper_temp=lower_temp+1;
arrow_left_posx= 129;
}
}
if (menu==5){
if ((digitalRead(BUTTON_UP_PIN) == LOW) && (button_up_clicked == 0)) { // up button clicked - jump to previous menu item
lower_temp++;
arrow_right_posx = 112;
arrow_left_posx = 83;
button_up_clicked = 1; }
if ((digitalRead(BUTTON_DOWN_PIN) == LOW) && (button_down_clicked == 0)) { // up button clicked - jump to previous menu item
lower_temp--;
arrow_right_posx = 112;
arrow_left_posx = 83;
button_down_clicked = 1; }
if ((digitalRead(BUTTON_UP_PIN) == HIGH) && (button_up_clicked == 1)) { // unclick
button_up_clicked = 0;
}
if ((digitalRead(BUTTON_DOWN_PIN) == HIGH) && (button_down_clicked == 1)) { // unclick
button_down_clicked = 0;
}
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=3;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
if (lower_temp>=upper_temp-1){
lower_temp=upper_temp-1;
arrow_right_posx= 129;
}
}
if (menu==8){
if ((digitalRead(BUTTON_UP_PIN) == LOW) && (button_up_clicked == 0)) { // up button clicked - jump to previous menu item
arrow_pos1--;
button_up_clicked = 1; }
if ((digitalRead(BUTTON_DOWN_PIN) == LOW) && (button_down_clicked == 0)) { // up button clicked - jump to previous menu item
arrow_pos1++;
button_down_clicked = 1; }
if ((digitalRead(BUTTON_UP_PIN) == HIGH) && (button_up_clicked == 1)) { // unclick
button_up_clicked = 0;
}
if ((digitalRead(BUTTON_DOWN_PIN) == HIGH) && (button_down_clicked == 1)) { // unclick
button_down_clicked = 0;
}
if (arrow_pos1<=0){
arrow_pos1=4;
}
if (arrow_pos1>=5){
arrow_pos1=1;
}
if (arrow_pos1==1){
arrow_posx1=3;
arrow_posy1=19;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
cool_stats=false;
heat_stats=!heat_stats;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos1==2){
arrow_posx1=3;
arrow_posy1=35;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
heat_stats=false;
cool_stats=!cool_stats;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos1==3){
arrow_posx1=3;
arrow_posy1=52;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
menu=2;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
if (arrow_pos1==4){
arrow_posx1=81;
arrow_posy1=52;
if ((digitalRead(BUTTON_SELECT_PIN) == LOW) && (button_select_clicked == 0)) { // up button clicked - jump to previous menu item
cool_stats,heat_stats=false;
button_select_clicked = 1; }
if ((digitalRead(BUTTON_SELECT_PIN) == HIGH) && (button_select_clicked == 1)) { // unclick
button_select_clicked = 0;
}
}
}
if (menu==6){
p1++;p1++;p1++;
if( p1 >= 100) {
menu = 1;
p1=0;
}
}
StringtoArray();
display.clearDisplay();//OLED
battery_display();
if (menu==1){
menu_display();
}
if (menu==2){
menu_option();
}
if (menu==3){
menu_setting();
}
if (menu==4){
setting_upper();
}
if (menu==5){
setting_lower();
}
if (menu==6){
saving_display();
}
if (menu==8){
manual();
}
// Tampilkan suhu rata-rata pada OLED
//All Display
display.drawBitmap( 99, 0, bitmap_batt[4],32, 14,SSD1306_WHITE);
display.drawBitmap( 0, 0, bitmap_notif_bar, 128, 16,SSD1306_WHITE);
display.display();
}