B4R Question SSD1306 OLED resolution

Discussion in 'B4R Questions' started by positrom2, Dec 15, 2016.

  1. positrom2

    positrom2 Active Member Licensed User

    I got an 1306 128x64 OLED (Waveshare).
    A line like
    Code:
    ssd.GFX.DrawLine(0,0,127,31,ssd.WHITE)
    diagonally covers the whole screen, so it appears that the y-axis in B4R is only 32 pixel wide.
    The Adafruit library supports 128x64 and 128x32 displays.
    https://github.com/adafruit/Adafruit_SSD1306
    Is there a choice in B4R for those display types?
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You need to edit Adafruit_SSD1306.h.
    Change:
    // #define SSD1306_128_64
    #define SSD1306_128_32
    // #define SSD1306_96_16

    To:
    #define SSD1306_128_64
    // #define SSD1306_128_32
    // #define SSD1306_96_16
     
  3. positrom2

    positrom2 Active Member Licensed User

    Thank you, that worked.
    Yesterday night I had tried that with the Arduino IDE, but it did not work. The Nodemcu apparently got more and more petulant and I stopped working.
    This morning I had changed the USB cable to a "thicker" one. I hope the reliability becomes (and stays) better.
    Though finally not a big project, I will post it when finished (graphing BMP280 data on OLED).
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice