Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

684 sdd1331 teensy 4.0
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

684 sdd1331 teensy 4.0

by type on Tue Sep 08, 2020 10:40 am

Hello,
sorry for my English....

I currently have to buy an OLED display - 16 bit color 0.96 "with microSD support
PRODUCT CODE: 684. to a French distributor.

Arduino 1.8.10
GFX 1.10.1
SSD1331 1.2.0
Teensy card 3.2 or 4.0

I can't seem to get setRotation (X) working.
it's been several days that I test without success.

for the project i need a 180 degree rotation

Thank you for your help

type
 
Posts: 3
Joined: Tue Sep 08, 2020 10:25 am

Re: 684 sdd1331 teensy 4.0

by mikeysklar on Wed Sep 09, 2020 3:58 pm

What does your setRotation code look like? Are you working with Bitmaps or text?

setRotation(0) or (1) - 0 and 90 degree rotations
setRotation(2) and (3) - 180 & 270 degree rotations

https://learn.adafruit.com/adafruit-gfx ... he-display

The rotation parameter can be 0, 1, 2 or 3. For displays that are part of an Arduino shield, rotation value 0 sets the display to a portrait (tall) mode, with the USB jack at the top right. Rotation value 2 is also a portrait mode, with the USB jack at the bottom left. Rotation 1 is landscape (wide) mode, with the USB jack at the bottom right, while rotation 3 is also landscape, but with the USB jack at the top left.
For other displays, please try all 4 rotations to figure out how they end up rotating as the alignment will vary depending on each display, in general the rotations move counter-clockwise
When rotating, the origin point (0,0) changes — the idea is that it should be arranged at the top-left of the display for the other graphics functions to make consistent sense (and match all the function descriptions above).
If you need to reference the size of the screen (which will change between portrait and landscape modes), use width() and height().

mikeysklar
 
Posts: 2007
Joined: Mon Aug 01, 2016 8:10 pm

Re: 684 sdd1331 teensy 4.0

by type on Thu Sep 10, 2020 2:21 am

Hello mikeysklar ,
thank you for your answer, I do exactly as you describe it.
I display a can of all, image, text, but for a rotation of 180 degrees it does not change anything.
the only solution I have found is to add more lines to the library.
it works for 0 or 180 degrees which is fine for me at the moment.

type
 
Posts: 3
Joined: Tue Sep 08, 2020 10:25 am

Re: 684 sdd1331 teensy 4.0

by mikeysklar on Thu Sep 10, 2020 2:01 pm

Hello type,

I would be curious to see your 'more lines' solution. What does the library modification code look like?

mikeysklar
 
Posts: 2007
Joined: Mon Aug 01, 2016 8:10 pm

Re: 684 sdd1331 teensy 4.0

by type on Fri Sep 11, 2020 12:40 am

Hello,
I'll give you an example when I get home.
kindly

type
 
Posts: 3
Joined: Tue Sep 08, 2020 10:25 am

Please be positive and constructive with your questions and comments.