oled does not work properly

Hi my friends, I bought an oled 0.96 ssd 1306 i2c, which unfortunately there is one line space between each text

You may be just not using the cursor properly

Unfortunately, this is not the case even with library examples

So what libraries are they?

u8glib
u8g2
Adafruit_GFX_Library
Adafruit_SSD1306
lcdgfx
and other available libraries…

All that you have to do is quote one library version and one example from that library by name.

If you make an edit to the example sketch, you paste the edited line(s) to your message.

David.

Example 128x64 i2c from the adafruit ssd1306 library
Changes:
It could not be turned on with the original oled code, so I made a change in line 59
Main line:
if (! display.begin (SSD1306_SWITCHCAPVCC, 0x3D)) {// Address 0x3D for 128x64

edited:
if (! display.begin (SSD1306_SWITCHCAPVCC, 0x3C)) {// Address 0x3D for 128x64

I did exactly the same: i.e Address 0x3C for 128x64

Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\SPI 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.12\hardware\arduino\avr\libraries\Wire 
Using library Adafruit_GFX_Library at version 1.9.0 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_SSD1306 at version 2.2.1 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_SSD1306 
Using library Adafruit_BusIO at version 1.3.2 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_BusIO 
"C:\\Users\\David Prentice\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino5/bin/avr-size" -A "C:\\Users\\DAVIDP~1\\AppData\\Local\\Temp\\arduino_build_649033/ssd1306_128x64_i2c.ino.elf"
Sketch uses 20522 bytes (63%) of program storage space. Maximum is 32256 bytes.
Global variables use 521 bytes (25%) of dynamic memory, leaving 1527 bytes for local variables. Maximum is 2048 bytes.

It works fine on I2C. So I built the SPI example which also worked fine. Nothing looks like the photo in #0

I suggest that you install / upgrade libraries via the IDE Library Manager.

Please post a link to the actual display that you bought. e.g. Ebay sale page.
Or post a photo of the pcb side of the display. The pcbs vary. Someone will recognise your pcb from photos of the pcb.

David.

I retried the library, deleted it and reinstalled it through the Library Manager, but it was still useless
Excuse me, I am an Iranian servant and the shop from which I bought this is also Persian
Purchase link:
https://b2n.ir/321543


photo_2020-08-22_22-34-29.jpg

photo_2020-08-22_22-34-33.jpg

The Display pcb that I used is exactly the same as your photo. I used a Uno clone.
The display should work 100%.

Have you compared your library version numbers ?
I am using IDE v1.8.12

It is not necessary to use the latest IDE version. Or even the latest Adafruit_xxx library version.

But it is always useful to know your versions. Then I can test the display with your exact software. Adafruit often break things in one Release and swiftly correct the problem in the next version.

David.

The arduino version is 1.8.13 and the library version is the latest version

If you are just using text, you might try Ada's ascii libraries. They are more suited to purpose. I had grief with other libraries - hence my question. They were superfluous anyway, so I didn't pursue the matter. I don't suppose for a moment they were suss, but so much of this stuff is just a matter of how far you are along the road to Damascus before you see the light, and when you do, you stay with what you have.

Do you have another display you can test the sketch with? That really looks like a hardware problem, with every other line not being displayed.

I have a suggestion to verify the modified code on an online Arduino emulator. Since you have tried with Adafruit_SSD1306, it is a good idea to verify the modified code as well. here is one link for you where you can see Adafruit_SSD1306 library working. Please check here

Another option is here

You can paste your modified code in the editor and see it in action, to validate the root cause.