Hallo, guten Abend!
Ich habe mir ein OLED Display gekauft und schon mehreres ausprobiert.
Einerseits mithilfe der Adafruit Bibliothek und auch mit der "U8glib.h". Ich habe bereits aufwendig frames erstellt und einen genauen Plan was darauf zu sehen sein soll.
Testweise habe ich dann mit unterstützung zahlreicher vergleichbarer YT-Videos ein Programm bei Wokwi für den Arduino UNO geschrieben
Programm bei Wokwi
Das Programm funktioniert in meinen Augen perfekt. Doch leider habe ich von der Hardware her, nur den Node MCU ( Esp 8266 12-F). Wie kann ich das Programm nun verändern, damit es für den Node Mcu passt?
Die passende Bibliothek habe ich natürlich bereits installiert. Es wäre super, wenn mir einer von euch weiterhelfen könnte, da ich mich garnicht mit dieser oder der Adafruit Bibliothek auskenne ![]()
Bei weiteren nachfragen stehe ich gerne bereit!
Vielen Dank im Voraus ![]()
Beste Grüße von funnyfritz
Hier noch einmal der Code:
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST);
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
};
const int epd_bitmap_allArray_LEN = 3;
const unsigned char* epd_bitmap_allArray[3] = {
epd_bitmap_1drehung,
epd_bitmap_2drehung,
epd_bitmap_3drehung
};
int progress = 0;
int frame = 0;
void setup() {
u8g.setFont(u8g_font_tpssb);
u8g.setColorIndex(1);
}
void loop() {
u8g.firstPage();
do {
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;}
}


