128x32 SSD1305 Display Off Center

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
kev5053
 
Posts: 1
Joined: Fri Mar 18, 2016 6:30 pm

128x32 SSD1305 Display Off Center

Post by kev5053 »

Hello!

I'm making a mini magic mirror and am utilizing the 128x32 SSD1305 OLED as my screen. I finally got it up and running (after changing the #if defined SSD1306_128_32 line to #if defined SSD1305_128_32), but it seems as though my display is off-centered by 4 pixels. It worked fine when I tested a display.print with the cursor set at 4,0; however, this is causing text wrap issues. If I set text wrap to true and set the cursor at 4,0 to fix the position issue, the next line doesn't indent with the first line and it's cut off on the left side. Here's a picture of the the screen when I run the example code:
OLED1.JPG
OLED1.JPG (98.91 KiB) Viewed 1516 times
And when I run a display.print with text wrap on and the cursor at 4,0:
OLED2.JPG
OLED2.JPG (100.59 KiB) Viewed 1516 times
Can anybody please help me with this issue? Thank you!

User avatar
controlfreaks
 
Posts: 13
Joined: Wed Mar 16, 2016 2:01 pm

Re: 128x32 SSD1305 Display Off Center

Post by controlfreaks »

I cannot help you but I also am having that same problem, once I changed that line that had 1306 instead of 1305. I have been having problems getting this display to work from the get go. Look at the post from me on Mar 16, I had some luck finally getting the 128 x 32 version of sdd1203.h thanks to hiduino. The right most column on my display seems to be corrupted and is shifting everything left. Also the beginning splash screen is cutting of the bottom of the Adafruit logo, but this might be normal.

Did you have to modify the code at all in any other way? I also purchased the 2.7" 128x64 oled display and have had no luck getting that on going, I would think it was a drop in replacment assuming the:

#define SSD1305_128_32
//#define SSD1305_128_64

was set to 128 x 64.

Cheers

James

User avatar
Scott_M25
 
Posts: 7
Joined: Wed Mar 16, 2016 8:32 am

Re: 128x32 SSD1305 Display Off Center

Post by Scott_M25 »

I am having the same issue with my SSD1305. I have been reading the technical data sheet and looking at the Adafruit_SSD1305.cpp file looking for something that could be adjusted, but I am very new to this and I just don't quite "get it" yet.

I did see the "Set Column Address" command and it seems like this might be something to do with it?

I added that to the .cpp file (since it was defined in the .h file I figured it wouldn't hurt) but I can't quite get the syntax for inputting the start and end column. I tried adding just one value:

command(SSD1305_SETCOLADDR | 0x4);

And re-complied the ssd1305test sketch. I was surprised to see that it fixed the problem, but now everything on the display is mirrored backwards.

Maybe someone smarter than me can take this clue and run with it.

https://youtu.be/sxOisx7JzpU

User avatar
MP3_Rider
 
Posts: 6
Joined: Thu Nov 20, 2014 2:00 pm

Re: 128x32 SSD1305 Display Off Center

Post by MP3_Rider »

I did some work on this problem back in Feb and created a branch on Github with my fixes. Note I only verified they work 128 X 32.

I only changed the file Adafruit_SSD1305.cpp. You might give it a shot.

https://github.com/MrMarkA/Adafruit_SSD1305_Library

User avatar
Scott_M25
 
Posts: 7
Joined: Wed Mar 16, 2016 8:32 am

Re: 128x32 SSD1305 Display Off Center

Post by Scott_M25 »

Thanks MP3_Rider, I tried your files and they had zero affect. I still have the screen off center by 4 pixels.

If I try "Patch 2" (https://github.com/MrMarkA/Adafruit_SSD ... kA-patch-2) the result is centered, but the graphics are mirrored backwards.

User avatar
Scott_M25
 
Posts: 7
Joined: Wed Mar 16, 2016 8:32 am

Re: 128x32 SSD1305 Display Off Center

Post by Scott_M25 »

After some messing around, I was able to get this working properly using MP3-Rider's files. Thanks!!!

User avatar
makerbotspace
 
Posts: 105
Joined: Tue Nov 02, 2010 12:28 pm

Re: 128x32 SSD1305 Display Off Center

Post by makerbotspace »

I'm having the same issue can you tell me how you resolved it or share your files?

Thank you

User avatar
Scott_M25
 
Posts: 7
Joined: Wed Mar 16, 2016 8:32 am

Re: 128x32 SSD1305 Display Off Center

Post by Scott_M25 »

Here's the library I am using successfully.
Attachments
Adafruit_SSD1305.zip
(9.47 KiB) Downloaded 197 times

User avatar
makerbotspace
 
Posts: 105
Joined: Tue Nov 02, 2010 12:28 pm

Re: 128x32 SSD1305 Display Off Center

Post by makerbotspace »

Thank you so much!

User avatar
micromouse
 
Posts: 1
Joined: Tue Oct 24, 2017 10:09 am

Re: 128x32 SSD1305 Display Off Center

Post by micromouse »

Thanks, the new library seems to work for me on 128x32- can someone tell ada and update the libraries???

User avatar
StuTheDog
 
Posts: 3
Joined: Fri Apr 27, 2018 12:51 am

Re: 128x32 SSD1305 Display Off Center

Post by StuTheDog »

This is good work but still not quite working for me, the display is mirrored backwards. To fix it I modified the rotation logic within the draw routine. Since someone else may be experiencing the same problem here is the modification (found with Adafruit_SSD1305::drawPixel():

Code: Select all

	switch (getRotation())
	{
	case 0:
		x = width() - x - 1;
		y = height() - y - 1;
		break;
	case 1:
		adagfx_swap(x, y);
		y = width() - y - 1;
		break;
	case 2:
		// correct
		break;
	case 3:
		adagfx_swap(x, y);
		x = height() - x - 1;
		break;
	}
Hope it helps!

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”