0.96 I2C Oled skipping one line

Hello everyone,

Firstly I would thank all the people actively helping out, this forum is always a help.

I have this "128X64 0.96 inch OLED LCD LED Display Module For Arduino 0.96" IIC SPI Communicate" cheapest oled module I bought from ali express (the only international site that works at my place )

Everything works fine, only that my display has this alternate blank lines (check attached image, vertical line of rectangle looks broken or like dots)

I am using Adafruit library (with H file properly uncommented for correct height 128x64)

I have also tried U8 library with No acknowledge setting,

I have banged my head around google and also hunted and found Chinese libraries that they says works

But my problems dosent go away. Looks like kinda interlaced effect. rest everything works like charm. Due to this problem the display doesn't look crisp and small text unreadable.

If I remember correctly when I bought that display sometimes ago. it worked on 128x32 settings without that interlacing effect (but everything was distorted (squeezed)) but it shows blank now with this setting (i think something to do with updated wire and adafruit libraries)

Big question. Is there is something I am doing wrong or the display isn't worth it ? I should move along.

EDIT: I have also ruled out the SSH1106, still displays same blank lines

this is U8 library menu example

if its of any help I have also attached the Chinese vendor's zip that used other pins for SCL SDA.

Arduino.zip (8.05 KB)

If the library and sketch is configured for a 128x32 instead of 128x64 when using a 128x64 display the you will get alternate lines being blank.

Check your sketch and library configuration.You may need to edit a file in the library if using the Adafruit one. It tells you what to do in the sketch. Check you have made these changes correctly and that you do not have several copies of the library loaded and are editting the one that is not being used by the IDE.

I am not familiar with the U8 library but maybe it is the same problem.

that's the problem, I am using correct height in adafruit library file I have checked manytimes.

I have only one library. double checked that too. used U8 library, "GOFi2cOLED" , each one works fine, but with alternate blank lines :S nobody on internet seems to have that issue :smiley:

Post a clear picture of the back of the display. There may be some I2C pull ups missing?

Does it work OK if you press and hold the Arduino reset button, then disconnect the display GND line, reconnect the GND line and then release the Arduino reset? (This forces a reset of the display)

Hi,

back side

front crisp image.

yes same results with reset as you advised.

Also tried with U8 library same results.

Should I declare my display faulty ?

Hey, i have the same problem :confused:

Maybe the OLED configuration does not fit.
For U8g2, I assume you use the SSD1306_128X64_NONAME driver/constructor: Please locate file u8x8_d_ssd1306_128x64_noname.c in your Arduino library directoy (linux: /home//Arduino/libraries/U8g2_Arduino/src/clib)

In line 61, change

 U8X8_CA(0x0da, 0x012), /* com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) */

to

 U8X8_CA(0x0da, 0x002), /* com pin HW config, sequential com pin config (bit 4), disable left/right remap (bit 5) */

Will this help?

Oliver

I have the same issue, CANNOT figure out what is going on... Anyone had any luck?

Does my advice for U8g2 help? If not, how does it look like before and after the modification to u8g2?
Where did you buy these displays?

Oliver

hi arifs, i've faced the same problem as u and i think i found the solution to it. i noticed that even if u did the uncomment and comment lines 73 [#define SSD1306_128_64] & 74 [// #define SSD1306_128_32] in the Adafruit_SSD1306.h, the arduino IDE doesn't seems to notice it. in the ssd1306_128x64.ino sketch, i wrote a line to test it, the defined is still SSD1306_128_32 and SSD1306_LCDHEIGHT is still defined to 32. my guess is once the library is installed to the IDE, any changes u done to the .h file, it won't have any effect, it will stick to the original version that u installed

what i did is i delete the Adafruit_SSD1306.h and library files and folders from arduino IDE, make sure that the library appears to the IDE as NOT INSTALL yet. Then u download again the library from github, BEFORE U OPEN AND RUN ANY OF THE EXAMPLE SKETCH OR INSTALL THE LIBRARY FROM THE DOWNLOAD, MAKE THE NECESSARY CHANGES TO THE SSD1306.h, uncomment and comment lines 73 [#define SSD1306_128_64] & 74 [// #define SSD1306_128_32]. after that u r safe to do the library installation and open and try the sketch

this method works for me, now my OLED is fixed, no more line skipping, i hope it helps u too :slight_smile:

thank you whitewolf_87 It work. and I'm didn't reinstall Adafruit_SSD1306 libary just edit and save it .then compile code again

The bottom right corner of the glass appears chipped off.

I have bought two such displays that arrived loose in a plastic bag (not even a padded bag). The first looked ok at a glance. On testing with both the Adafruit library set to 128x64, and the text only SSD1306AsciiWire.h library, only the bottom half of the display worked and the default font size was illegible (x2 was OK). Then I noticed both the bottom corners of the glass were chipped, with further cracks to the glass under the plastic ribbon wire. Then I saw this thread and wondered if the illegibility of small fonts wasn't a limitation of the display, but every other line being faulty on the bottom half of the display too. Fortunately the application (a GSM datalogger) this display is largely for debugging and the faulty unit is good enough.

I bought a second unit to see the displays full potential; this arrived similarly poorly packaged and cracked, and didn't work at all (apart from being detected on the I2C bus by an address scanner).

Third time lucky: one seller was listing the device showing it packed in a hard plastic case, this arrived undamaged and the display functions perfectly (the smallest fonts are legible, and the whole display area works) with no changes to the code, confirming my previous problems were down to the cracked glass.

Guys, it's not broken. I just picked up my first OLED and it was skipping lines. Tutorials were telling me the library needs to be edited, but that's old pre-update information. Here's the real problem...

The Adafruit example sketch for 128x64 is broken. Use the 128x32 example sketch and change:

#define SCREEN_HEIGHT 32
to:
#define SCREEN_HEIGHT 64 and it works fine.

I really hope I'm not the first person to figure this out... People have probably been throwing away perfectly good OLEDs.

1 Like

No, I would just expect people to tell the difference by looking at a 2:1 shape compared with a 4:1 shape.

TV screens are either 4:3 or 5:3 so it is not unknown to have different shapes.

David.

Hi All

The SSD1306 includes two different modes, which may lead to the above artefacts if mode and display do not match.

I never got an answer to my questions above, but I created a new constructor "U8G2_SSD1306_128X64_ALT0" for U8g2lib which implements the other mode. So either "U8G2_SSD1306_128X64_ALT0" or "U8G2_SSD1306_128X64_NONAME" should work correctly.

But as I said... I never got feedback here...

Oliver

Hey!

I had the same Problem, but i fixed it by myself in a pretty simple Way.

Just open your ADAFRUIT_SSD1306.h file and change in line 73 the #define SSD1306_128_32 to
#define SSD1306_128_64.

There are 3 possibilites, 2 of them are commented. Un-comment your display type and thats it!

I Hope i could help. :slight_smile:

Cloudy.

Check this thread on github for another cause of this error:

Someone there mentioned that if the display has a cracked corner, that can also cause this. This was the case for me.