#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST); // Fast I2C / TWI
// 'WoLamboMC', 128x32px
const unsigned char epd_bitmap_OhneMotor [] 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, 0x78,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x84,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x04,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04,
0x30, 0x1c, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04,
0x30, 0x1c, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04,
0x30, 0x1c, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x04, 0x07, 0xff, 0x84,
0x30, 0x1c, 0x7c, 0x01, 0xc0, 0x1f, 0xe1, 0xfc, 0x78, 0x60, 0x00, 0xf8, 0x04, 0x08, 0x20, 0x78,
0x30, 0x1c, 0x7c, 0x01, 0xc0, 0x1f, 0xf1, 0xfc, 0x78, 0x63, 0xc0, 0xf8, 0x08, 0x10, 0x10, 0x20,
0x30, 0x1c, 0x7c, 0x01, 0xc0, 0x1f, 0xf1, 0xfc, 0x7c, 0x63, 0xc0, 0xf8, 0x08, 0x20, 0x08, 0x20,
0x30, 0x1d, 0x83, 0x01, 0xc0, 0x00, 0x1d, 0x83, 0x87, 0x63, 0xe3, 0x06, 0x08, 0x20, 0x08, 0x20,
0x33, 0x9d, 0x83, 0x01, 0xc0, 0x03, 0xfd, 0x83, 0x87, 0x7c, 0x3b, 0x06, 0x08, 0x20, 0x08, 0x20,
0x33, 0x9d, 0x83, 0x01, 0xc0, 0x03, 0xfd, 0x83, 0x87, 0x7c, 0x3b, 0x06, 0x08, 0x20, 0x08, 0x20,
0x3c, 0xfd, 0x83, 0x01, 0xc0, 0x18, 0x1d, 0x83, 0x87, 0x60, 0x3b, 0x06, 0x08, 0x20, 0x08, 0x20,
0x3c, 0x7d, 0x83, 0x01, 0xc0, 0x1c, 0x1d, 0x83, 0x87, 0x60, 0x3b, 0x06, 0x08, 0x10, 0x10, 0x20,
0x3c, 0x7d, 0x83, 0x01, 0xc0, 0x1c, 0x1d, 0x83, 0x87, 0x70, 0x3b, 0x86, 0x04, 0x08, 0x20, 0x40,
0x30, 0x1c, 0x7c, 0x01, 0xff, 0xc3, 0xfd, 0x83, 0x87, 0x7f, 0xc0, 0xf8, 0x04, 0x07, 0xc0, 0x40,
0x30, 0x1c, 0x7c, 0x01, 0xff, 0xc3, 0xfd, 0x83, 0x87, 0x7f, 0xc0, 0xf8, 0x02, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x06, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
// '1drehung', 16x9px
const unsigned char epd_bitmap_1drehung [] PROGMEM = {
0x00, 0x80, 0x04, 0x90, 0x02, 0xa0, 0x01, 0xc0, 0x0f, 0xf8, 0x01, 0xc0, 0x02, 0xa0, 0x04, 0x90,
0x00, 0x80
};
// '2drehung', 16x9px
const unsigned char epd_bitmap_2drehung [] PROGMEM = {
0x00, 0x40, 0x02, 0x40, 0x01, 0x50, 0x0f, 0xe0, 0x03, 0xe0, 0x03, 0xf8, 0x05, 0xc0, 0x01, 0x20,
0x01, 0x00
};
// '3drehung', 16x9px
const unsigned char epd_bitmap_3drehung [] PROGMEM = {
0x01, 0x00, 0x01, 0x20, 0x05, 0xc0, 0x03, 0xf8, 0x01, 0xe0, 0x0f, 0xe0, 0x01, 0xd0, 0x02, 0x40,
0x00, 0x40
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 144)
const int epd_bitmap_allArray_LEN = 3;
const unsigned char* epd_bitmap_allArray[3] = {
epd_bitmap_1drehung,
epd_bitmap_2drehung,
epd_bitmap_3drehung
};
// Array of all bitmaps for convenience. (Total bytes used to store images in PROGMEM = 528)
int progress = 0;
int frame = 0;
void setup() {
u8g.setFont(u8g_font_tpssb);
u8g.setColorIndex(1);
}
void loop() {
u8g.firstPage();
do {
//u8g.drawStr(25, 50, "Progress Bar");
// u8g.drawFrame(0, 10, 128, 20);
// u8g.drawBox(10, 15, progress, 10);
u8g.drawBitmapP(0,0,128/8,32,epd_bitmap_OhneMotor);
u8g.drawBitmapP(103,11,16/8,9,epd_bitmap_allArray[frame]);
} while ( u8g.nextPage() );
frame=frame+1;
if (frame > 2) {frame=0;}
//if (progress < 108) {
// progress++;
// } else {
// progress = 0;
//}
}