Adafruit SHARP Memory Display - Screen Orientation

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
jonnydub
 
Posts: 2
Joined: Thu Jan 19, 2023 1:54 pm

Adafruit SHARP Memory Display - Screen Orientation

Post by jonnydub »

Hello,

I'm a noob so please bear with me!

Recently brought a Adafruit SHARP Memory Display Breakout - 1.3" 168x144 which a really nice display however i'm having trouble finding the code to change the screen display from Portrait (144x168) to Landscape (168x144) as I wish to utilise the display side on.

Is there a method to change this setting using the display driver or will I need to rotate everything I draw 90 degrees (e.g images and text)

Code: Select all

# display = adafruit_sharpmemorydisplay.SharpMemoryDisplay(spi, scs, 96, 96)
display = adafruit_sharpmemorydisplay.SharpMemoryDisplay(spi, scs, 144, 168)
Any help much appreciated

Thanks

Jonny

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: Adafruit SHARP Memory Display - Screen Orientation

Post by mikeysklar »

Jonny,

Try adding:

Code: Select all

display.setRotation(1); 
It can go right after:

Code: Select all

display.clearDisplay();
https://github.com/adafruit/Adafruit_SH ... emtest.ino

User avatar
jonnydub
 
Posts: 2
Joined: Thu Jan 19, 2023 1:54 pm

Re: Adafruit SHARP Memory Display - Screen Orientation

Post by jonnydub »

Thank you @mikeysklar

I was using Python via a Pi4 but thanks for that link, i'll use this code instead.

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

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