greiman / SSD1306Ascii

Text only Arduino Library for SSD1306 OLED displays
MIT License
490 stars 120 forks source link

Support for 0.42" OLED 72x40 #115

Open HilmarSt opened 8 months ago

HilmarSt commented 8 months ago

...fitted on an ESP32 board: ESP32-C3-0.42LCD

Thank you for this great library, have fun :-)

static const uint8_t MEM_TYPE oled_72x40init[] = {
    SSD1306_DISPLAYOFF,
    SSD1306_SETDISPLAYCLOCKDIV, 0x80,
    SSD1306_SETMULTIPLEX, 0x27,
    SSD1306_SETDISPLAYOFFSET, 0x0,
    SSD1306_CHARGEPUMP, 0x14,
    0xAD /*IREF Setting*/, 0x30,
    SSD1306_SETSTARTLINE,
    SSD1306_NORMALDISPLAY,
    SSD1306_DISPLAYALLON_RESUME,
    SSD1306_SEGREMAP | 0x1,
    SSD1306_COMSCANDEC,
    SSD1306_SETCOMPINS, 0x12,
    SSD1306_SETCONTRAST, 0x7F,
    SSD1306_SETPRECHARGE, 0x22,
    SSD1306_SETVCOMDETECT, 0x20,
    SSD1306_DISPLAYON
};
static const DevType MEM_TYPE oled_72x40 = {
  oled_72x40init,
  sizeof(oled_72x40init),
  72,
  40,
  28 // Column offset RAM to display.
};