Integrate the SH1106 O-LED Driver

Hello Guys

I started to work with XOD a few week ago and im really loving it!
Now ive got a Display with a SH 1106 Driver instead of a SSD1306…

On Hackaday ive found, thats the only difference between them is the Memory- Map (132 instead of 124).
Its my first time, i try to implement a C++ Library and im not sure how to do this… which would be the best way to do it? Can i just change the existing SSD1306 node to another library (maybe [](U8G2 from Olikraus), or OLED SSD1306 - SH1106 from Fabio Durigon(cannot post 2 links maybe google it))

Does anyone have a few hints for me, how to do this?

Thanks and greetings


Hi Benjamin,

You’ve essentially got two options:

  1. If you want to use the xod/graphics nodes, then you will need to write a compatible library for the SH1106. You could use xod-dev/ssd1306-display as a template. Note that xod-dev/ssd1306-display wraps an Arduino C++ library: You will need to create a similar Arduino library for the SH1106.
  2. An alternative approach would be to wrap one of the Arduino libraries you mentioned (U8G2 or OLED SSD1306 - SH1106). Instructions for wrapping Arduino libraries can be found here: In this case you will create your own graphics nodes from the methods in the Arduino library, rather than make use of the xod/graphics nodes.

I used the 2nd approach to create wayland/ssd1306-oled-i2c/ from

Hey Wayland!

Thanks alot for your answer… ive started now with your 2nd advice and try to get it work… :wink:

Started to create mine on the base of your oled- i2c wrapper… seems to work until i want to load a second header out of the u8g2lib.h (u8x8.h that should be downloaded with the rest of the github stuff)

Best Benjamin

Looks like you’ve got a typo. The u in u8x8lib.h should be upper case.

I’m not very familiar with olikraus’s libraries, but I wonder if you would be better off using rather than

One other thing to note, I created my oled library a while ago, so it uses the old-style c++ syntax. The old-style code remains compatible with the latest version of XOD, but the new syntax introduced in v0.35 is more succinct. See

Thank you and sorry for my late response… trying to get it work… my c++ skills are not up to date but im learning atm… So ill come back when im doing some steps forward…


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