[SOLVED] 1.3 " OLED almost working

I bought a cheap display and thought I could find info about it. I couldn't. So I just hooked it up to a Leonardo and this is what I got from a demo porogram.


There are two columns of garbage pixels at the right edge. And the graphics are probably two pixels off to the left. Any idea what I should do to fix this? The images are from the Arduino_Sensorkit Oled_Display example. The U8g2 examples (for a 128*64 I2C display) had a similar annoyance.

1 Like

You need to setup the library for the SH1106;

//U8X8_SSD1306_128X64_NONAME_HW_I2C disp(U8X8_PIN_NONE);    //use this line for standard 0.96" SSD1306
U8X8_SH1106_128X64_NONAME_HW_I2C disp(U8X8_PIN_NONE);       //use this line for 1.3" OLED often sold as 1.3" SSD1306
2 Likes

Thanks for that! It works now. Didn't even know it was an SH1106.

Hence the comment in the code above;

//use this line for 1.3" OLED often sold as 1.3" SSD1306

The case was even worse. I had absolutely no clue what it was. I only knew it was a 1.3" OLED. Monochrome 128*64. I2C.
I tried the SSD1306, because that line in the code clearly included SCK and SDA, as well as I2C (the lines where you pick your own board by uncommenting it). I thought it would either work or remain black. Never thought it would work almost correct with the wrong driver picked.

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