U8glib.h auf dem Node MCU

Welsche wo ?
Link bitte

Damit quellen wir uns doch

Dann habe ich leider auch keine Idee mehr.

Glücklicherweise geht es ja auch ohne PROGMEM. Eventuell könnte man die Grafik auch in LittleFS ablegen.

Genau, wen mehr zeit bleibt werde rumspielen

Kannst Du den mal starten:

#include <U8g2lib.h>

U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

//U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

static 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
static 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
static 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
static 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()
{
  u8g2.begin();
  u8g2.clearBuffer();
  u8g2.setDrawColor(0);
}

void loop()
{
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM (0, 0, 128 / 8, 32, epd_bitmap_OhneMotor);
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_1drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_2drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_3drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
}

Habe dien Link getestet :wink:


Werde Dein morgen testen, und ach das umbauen wie ich das vorhabe. Heute ist mit ESP 8266 Feierabend

Nix botet neu :rage:
So wie geschrieben teste Morgen nach meinen Gedanken.
Schätze der Wurm wir sehr klein sein, aber jetzt wird ESP abgeschaltet :wink:

Mein Sohnemann hats herausgefunden
"Im Procesor ist eingebaut "Fluch der Chinesen"", man soll ESP32 verwenden :see_no_evil: :rofl:

"_F_" steht für "full buffer", was

  u8g2.firstPage();
  do
  {
...
  }
  while ( u8g2.nextPage() );

widerspricht, denn das ist "page buffer". Ist das Deine Absicht?

Wenn nicht, müßte "_F_" durch "_1_" ersetzt werden.

Schlaues Kerlchen :slightly_smiling_face:

Ne. Hab ich übersehen. :weary:
@fony nochmal machen bitte...

#include <U8g2lib.h>

U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

//U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

static 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
static 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
static 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
static 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()
{
  Serial.begin(9600);
  u8g2.begin();
  u8g2.clearBuffer();
  u8g2.setDrawColor(0);
}

void loop()
{
   Serial.println(" ");
  Serial.println("1 Loop");
  u8g2.firstPage();
   Serial.println("2 Zeile 85");
  do
  {
    u8g2.drawXBM (0, 0, 128 / 8, 32, epd_bitmap_OhneMotor);
    Serial.println("3 Zeile 89");
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_1drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_2drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
  u8g2.firstPage();
  do
  {
    u8g2.drawXBM(103, 11, 16 / 8, 9, epd_bitmap_3drehung);
  }
  while ( u8g2.nextPage() );
  delay(500);
}

Habe SerMon eingebaut das kommt heraus

 
22:49:32.249 -> 1 Loop
22:49:32.249 -> 2 Zeile 85
22:49:32.249 -> 
22:49:32.249 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
22:49:32.349 -> 
22:49:32.349 -> Exception (3):
22:49:32.349 -> epc1=0x40201054 epc2=0x00000000 epc3=0x00000000 excvaddr=0x402398ab depc=0x00000000
22:49:32.434 -> 
22:49:32.481 -> >>>stack>>>
22:49:32.481 -> 
22:49:32.481 -> ctx: cont
22:49:32.481 -> sp: 3ffffda0 end: 3fffffc0 offset: 0190
22:49:32.527 -> 3fffff30:  00000000 3ffee380 00000000 40201048  
22:49:32.565 -> 3fffff40:  00000000 00000010 3ffee380 3ffee654  
22:49:32.612 -> 3fffff50:  402028e0 3ffee5ec 3ffe86a1 00000010  
22:49:32.650 -> 3fffff60:  00000000 00000000 00000000 4020111c  
22:49:32.750 -> 3fffff70:  3ffee380 00000020 00000002 402398ab  
22:49:32.750 -> 3fffff80:  3fffdad0 3ffee5ec 3ffee5ec 3ffee654  
22:49:32.851 -> 3fffff90:  3fffdad0 3ffee5ec 3ffee380 402022f1  
22:49:32.897 -> 3fffffa0:  feefeffe 00000000 3ffee614 40203160  
22:49:32.951 -> 3fffffb0:  feefeffe feefeffe 3ffe84e8 40100eb5  
22:49:32.998 -> <<<stack<<<
22:49:32.998 -> 
22:49:32.998 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
22:49:33.051 -> ⸮⸮⸮⸮L⸮⸮⸮⸮⸮ 
22:49:33.499 -> 1 Loop
22:49:33.499 -> 2 Zeile 85
22:49:33.499 -> 
22:49:33.499 -> --------------- CUT HERE FOR EXCEPTION DECODER ---------------
22:49:33.552 -> 
22:49:33.552 -> Exception (3):
22:49:33.599 -> epc1=0x40201054 epc2=0x00000000 epc3=0x00000000 excvaddr=0x402398ab depc=0x00000000
22:49:33.652 -> 
22:49:33.699 -> >>>stack>>>
22:49:33.699 -> 
22:49:33.699 -> ctx: cont
22:49:33.699 -> sp: 3ffffda0 end: 3fffffc0 offset: 0190
22:49:33.752 -> 3fffff30:  00000000 3ffee380 00000000 40201048  
22:49:33.799 -> 3fffff40:  00000000 00000010 3ffee380 3ffee654  
22:49:33.853 -> 3fffff50:  402028e0 3ffee5ec 3ffe86a1 00000010  
22:49:33.899 -> 3fffff60:  00000000 00000000 00000000 4020111c  
22:49:33.953 -> 3fffff70:  3ffee380 00000020 00000002 402398ab  
22:49:34.000 -> 3fffff80:  3fffdad0 3ffee5ec 3ffee5ec 3ffee654  
22:49:34.053 -> 3fffff90:  3fffdad0 3ffee5ec 3ffee380 402022f1  
22:49:34.154 -> 3fffffa0:  feefeffe 00000000 3ffee614 40203160  
22:49:34.154 -> 3fffffb0:  feefeffe feefeffe 3ffe84e8 40100eb5  
22:49:34.254 -> <<<stack<<<
22:49:34.254 -> 

Bei Zeile 89 Kracht es

u8g2.drawXBM (0, 0, 128 / 8, 32, epd_bitmap_OhneMotor);

Las es für Heut hat kein Sin.

Wolltest Du nicht vorhin schon? - Aber ja... tu es...

Da hilft dann vermutlich nur der ExceptionDecoder.

Ich hab nochmal in der Reference zu XBM nachgelesen, werde da aber nicht ganz schlau draus.

Also P ja, aber nur für AVR....???

Wurde eher fertig als dachte :wink: ob funktioniert wie geplant weis ich morgen
Für Arduino nehme ich Chrome der fragt ob er die angezeigte Seite soll Übersetzen, ist zwa nicht Deepl aber es geht, manchmal muss man Switchen um verstehen aber es geht :wink:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.