Adafruit 1431 on Nano – GUI gets offset

Hi forum.

I have attached an Adafruit 1431 colour OLED to my Nano and copied some nice test code I found on this page: Adafruit SSD1351 library.

After adjusting the pins, I have managed to get everything working just finely. Except for one detail: the "GUI" is not centred on the display, it gets offset about 1/4 downwards, see image.

I have tried both the SPI and the non-SPI options in the code, same results.

I have also tried rotating the GUI with the code's tft.setRotation(…) function. The offset is still there, staying in the original orientation even though the image is rotated (the offset does not rotate with the image).

Does anybody know why I'm getting this? And what the remedy might be? The code is right out of the box, so I guess it's down to my wiring or something like that.

Thanks
TLS

Go to the IDE Library Manager. Update Adafruit_GFX and Adafruit_SSD1351

The code in your link runs ok with my non-Adafruit SSD1351. But SLOWLY.
Much faster with the HW SPI constructor.

David.

Hi, thanks for your reply.

I have the latest versions of both: Adafruit_GFX – version 1.7.0; Adafruit_SSD1351 – version 1.2.2.

Any other tips? Since the code runs finely with you, I guess the problem might be HW-related. I'll check my wiring again but since everything is right apart from this offset, I don't suppose I'll find very much.

SPI: As I mentioned, I tried both versions and the SPI alternative is truly much faster, so of course I've chosen that one for further work. But the offset problem is with both alternatives.

I solved it by installing an older version (1.1.1) of the 1351 library. My display must be an oldie, or what?

Woo-hoo. I re-built with your version numbers:

Using library Adafruit_GFX_Library at version 1.7.0 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_SSD1351_library at version 1.2.2 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_SSD1351_library 
Using library SPI at version 1.0 in folder: C:\Users\David Prentice\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\libraries\SPI 
"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_720774/tls_ssd1351.ino.elf"
Sketch uses 16396 bytes (50%) of program storage space. Maximum is 32256 bytes.
Global variables use 763 bytes (37%) of dynamic memory, leaving 1285 bytes for local variables. Maximum is 2048 bytes.

And v1.2.2 produces complete rubbish. Likewise v1.2.1 and v1.2.0
v1.1.1 works ok.

I will investigate later today.

David.

Great! Many thanks.