////////////////////////////////////////////////////////////////////////////
// Sprites START
// Sprites START
#define SPRITE_arrow_width 7
#define SPRITE_arrow_height 9
static unsigned char SPRITE_arrow_left[] = {
0x0F, 0x47, 0x63, 0x71, 0x78, 0x71, 0x63, 0x47, 0x0F, };
static unsigned char SPRITE_arrow_right[] = {
0x78, 0x71, 0x63, 0x47, 0x0F, 0x47, 0x63, 0x71, 0x78, };
#define SPRITE_icon_bulb_1_width 9
#define SPRITE_icon_bulb_1_height 13
static unsigned char SPRITE_icon_bulb_1[] = {
0x38, 0x00, 0xC6, 0x00, 0x01, 0x01, 0x01, 0x01, 0x29, 0x01, 0x39, 0x01,
0x29, 0x01, 0xAA, 0x00, 0x7C, 0x00, 0x44, 0x00, 0x7C, 0x00, 0x44, 0x00,
0x38, 0x00, };
#define SPRITE_icon_bulb_2_width 13
#define SPRITE_icon_bulb_2_height 17
static char SPRITE_icon_bulb_2[] = {
0x40, 0x00, 0x00, 0x00, 0x41, 0x10, 0x02, 0x08, 0xE0, 0x00, 0x18, 0x03,
0x04, 0x04, 0x04, 0x04, 0xA5, 0x14, 0x04, 0x04, 0xA4, 0x04, 0xA8, 0x02,
0xF1, 0x11, 0x10, 0x01, 0xF0, 0x01, 0x10, 0x01, 0xE0, 0x00, };
#define SPRITE_icon_snow_width 11
#define SPRITE_icon_snow_height 11
static char SPRITE_icon_snow[] = {
0x50, 0x00, 0x24, 0x01, 0x26, 0x03, 0xA8, 0x00, 0x71, 0x04, 0xDE, 0x03,
0x71, 0x04, 0xA8, 0x00, 0x26, 0x03, 0x24, 0x01, 0x50, 0x00, };
#define SPRITE_icon_sun_width 15
#define SPRITE_icon_sun_height 15
static char SPRITE_icon_sun [] = {
0x80, 0x00, 0x00, 0x00, 0x84, 0x10, 0x88, 0x08, 0x10, 0x04, 0xC0, 0x01,
0x20, 0x02, 0x2D, 0x5A, 0x20, 0x02, 0xC0, 0x01, 0x10, 0x04, 0x88, 0x08,
0x84, 0x10, 0x00, 0x00, 0x80, 0x00, };
#define SPRITE_icon_drop_1_width 7
#define SPRITE_icon_drop_1_height 13
static char SPRITE_icon_drop_1[] = {
0x08, 0x08, 0x14, 0x14, 0x22, 0x22, 0x41, 0x41, 0x41, 0x45, 0x49, 0x22,
0x1C, };
#define SPRITE_icon_drop_2_width 7
#define SPRITE_icon_drop_2_height 13
static char SPRITE_icon_drop_2[] = {
0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x3E, 0x7F, 0x7F, 0x7F, 0x7D, 0x7B, 0x3E,
0x1C, };
#define SPRITE_icon_sens_1_width 13
#define SPRITE_icon_sens_1_height 5
static char SPRITE_icon_sens_1[] = {
0x40, 0x00, 0x51, 0x05, 0x55, 0x15, 0x51, 0x05, 0x40, 0x00, };
#define SPRITE_icon_sens_2_width 13
#define SPRITE_icon_sens_2_height 13
static char SPRITE_icon_sens_2[] = {
0x40, 0x00, 0x40, 0x04, 0x44, 0x04, 0x44, 0x05, 0x45, 0x15, 0x55, 0x15,
0x55, 0x15, 0x55, 0x15, 0x45, 0x15, 0x44, 0x05, 0x44, 0x04, 0x40, 0x04,
0x40, 0x00, };
#define SPRITE_icon_cross_width 21
#define SPRITE_icon_cross_height 21
static char SPRITE_icon_cross[] = {
0x00, 0x1F, 0x00, 0xC0, 0x7F, 0x00, 0xF0, 0xFF, 0x01, 0xF8, 0xE0, 0x03,
0x3C, 0x8E, 0x07, 0x1C, 0x0E, 0x07, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E,
0x07, 0x0E, 0x1C, 0x07, 0x0E, 0x1C, 0x07, 0x0E, 0x1C, 0xC7, 0x7F, 0x1C,
0xC7, 0x7F, 0x1C, 0xCE, 0x7F, 0x0E, 0x0E, 0x0E, 0x0E, 0x1C, 0x0E, 0x07,
0x3C, 0x8E, 0x07, 0xF8, 0xE0, 0x03, 0xF0, 0xFF, 0x01, 0xC0, 0x7F, 0x00,
0x00, 0x1F, 0x00, };
// Sprites END
////////////////////////////////////////////////////////////////////////////////////////////////
// Librarys
#include <U8g2lib.h>
#include <Wire.h>
// OLED Display Constructor
U8G2_SSD1306_128X64_NONAME_2_HW_I2C u8g2(U8G2_R0);
//////////////////////////////////////////////////////////////////////////////////////////////
void setup()
{
// OLED Setup
u8g2.begin();
u8g2.setContrast(200);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
// MAIN PART
void loop()
{
u8g2.firstPage();
do {
char menuTitle [] = "LIGHT MODE";
char submenuTitle [] = "BRIGHTNESS";
char styleTitle [] = "LOREM IPSUM";
u8g2.setDrawColor(0);
u8g2.drawXBM(3, 0, SPRITE_arrow_width, SPRITE_arrow_height, SPRITE_arrow_left);
u8g2.drawXBM(118, 0, SPRITE_arrow_width, SPRITE_arrow_height, SPRITE_arrow_right);
u8g2.setDrawColor(1);
u8g2.drawBox(0,13,128,40);
u8g2.setDrawColor(0);
u8g2.drawDisc(60, 48, 2, U8G2_DRAW_ALL);
u8g2.drawCircle(67, 48, 2, U8G2_DRAW_ALL);
u8g2.drawRBox(35,22,10,10,2);
u8g2.drawRBox(47,22,10,10,2);
u8g2.drawRBox(59,22,10,10,2);
u8g2.drawRBox(71,22,10,10,2);
u8g2.drawRBox(83,22,10,10,2);
u8g2.drawRBox(35,34,10,10,2);
u8g2.drawRBox(47,34,10,10,2);
u8g2.drawRBox(59,34,10,10,2);
u8g2.drawRBox(71,34,10,10,2);
u8g2.drawRBox(83,34,10,10,2);
u8g2.setFont(u8g2_font_tinytim_tr);
u8g2.setCursor(64-((u8g2.getStrWidth(styleTitle))/2), 20);
u8g2.print(styleTitle);
u8g2.drawXBM(7, 23, SPRITE_icon_cross_width, SPRITE_icon_cross_height, SPRITE_icon_cross);
u8g2.drawXBM(100, 23, SPRITE_icon_cross_width, SPRITE_icon_cross_height, SPRITE_icon_cross);
u8g2.setDrawColor(1);
u8g2.drawBox(37,24,6,6);
u8g2.drawBox(49,24,6,6);
u8g2.drawBox(61,24,6,6);
u8g2.drawBox(73,24,6,6);
u8g2.drawBox(85,24,6,6);
u8g2.drawBox(37,36,6,6);
u8g2.drawBox(49,36,6,6);
u8g2.drawBox(61,36,6,6);
u8g2.drawBox(73,36,6,6);
u8g2.drawBox(85,36,6,6);
u8g2.setFont(u8g2_font_tenthinguys_tf);
u8g2.setCursor(64-((u8g2.getStrWidth(menuTitle))/2), 9);
u8g2.print(menuTitle);
u8g2.setFont(u8g2_font_profont11_tf);
u8g2.setCursor(64-((u8g2.getStrWidth(submenuTitle))/2), 64);
u8g2.print(submenuTitle);
u8g2.setDrawColor(0);
u8g2.drawBox(62, 25, 4, 4);
} while ( u8g2.nextPage() );
}