Arduino UNO with a noname ssd1306 128x64 I2C running the u8x8 helloworld example sketch.
U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=/ SCL, / data=/ SDA, / reset=*/ U8X8_PIN_NONE);
Display is offset -2 pixels to the left.
Any way to change the offset?

This is a SH1106 OLED... Hmm.. I should add this to my FAQ list.
Ooh, if so I'm sorry. Seller listed it as SSD1306. I'll change the config and retry tomorrow.
I have updated the draft version of the u8g2 FAQ:
https://github.com/olikraus/u8g2/blob/master/doc/faq.txt
Let me know whether the SH1106 constructor works.
Ok thank you.
I see no SH1106 I2C constructor in the library (2.10.1)
Sorry, found it and tried:
U8X8_SH1106_128X64_NONAME_SW_I2C u8x8(2,0,U8X8_PIN_NONE);
No display at all.
What about this?
U8X8_SH1106_128X64_NONAME_SW_I2C u8x8(/* clock=/ SCL, / data=/ SDA, / reset=*/ U8X8_PIN_NONE);
I mean, in the original constructor, just replace SSD1306 with SH1106
Thanks for the feedback :-)
for the record, I may also have the same oled 128x64 screen. Because mine also has VCC first, GND as the second in.
My version worked flawlessly with this one:
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
I also have a 128x32 display but the pin layout is GND+VCC+SCL+SDA
It worked with U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0);
Thank you Oli for such a great library and faq!
:-)
What about this?
I mean, in the original constructor, just replace SSD1306 with SH1106
This fixed it all for me!
Most helpful comment