A true screensaver for OLED display?

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
ba58smith
 
Posts: 14
Joined: Tue Oct 20, 2015 4:55 pm

A true screensaver for OLED display?

Post by ba58smith »

I'm using the Adafruit SSD1327 library to control a 128x128 OLED grayscale display. To avoid "image burn in", I want to turn the display off most of the time, and wake it up with a button press. However, when I wake it up, I want it to display the current info - the info that would be on the display at that moment if the display had NOT been turned off. The data on the display changes every 3.5 seconds, but it may take several minutes for all of the data on the display to "get current", so I don't want the display buffer to stop receiving the updated text that I'm sending it every 3.5 seconds - I just don't want it to display the text until I push the button.

I've found screensavers for OLEDs, but as far as I can tell, when the screensaver goes away (after my button push), the screen will not have any idea what data to display, until my program starts telling it, from that point forward. So when I ask about a "true screensaver", I mean like the ones on computer screens - as soon as you hit a key to make the screensaver go away, the screen displays the current status of whatever program was on the screen when the screensaver kicked in.

Seems like all of my data needs to keep getting written to some buffer, and when I push the "wake up" button, all of that data needs to be sent to the display, and displayed.

Is there a way to do this? I've done a lot of searching, online and in the SSD1327 library (and the underlying classes), and I can't find anything. Thanks!!!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: A true screensaver for OLED display?

Post by adafruit_support_bill »

So when I ask about a "true screensaver", I mean like the ones on computer screens - as soon as you hit a key to make the screensaver go away, the screen displays the current status of whatever program was on the screen when the screensaver kicked in.
They typically show all the open windows in their last known positions, but if the data in those windows has been updating all along, what you see when it wakes up is current data - not a replay of everything while it was sleeping.

To do what you are describing, you will need to save the data somewhere. That could be a lot of data if the display has been off for very long. Most microcontrollers have limited memory, so a file on an SD card is probably your best bet. Some of our processors have a built-in SD card slot (e.g. Adalogger). We also have SD breakouts, shields and Feather Wings.

User avatar
ba58smith
 
Posts: 14
Joined: Tue Oct 20, 2015 4:55 pm

Re: A true screensaver for OLED display?

Post by ba58smith »

They typically show all the open windows in their last known positions, but if the data in those windows has been updating all along, what you see when it wakes up is current data - not a replay of everything while it was sleeping.
I don't want to replay everything while it was sleeping - I just want to display the current data, as soon as the screensaver turns off. For example, one area of the display shows a counter, which might have been at 100 when the screensaver came on, and is now at 150. When the screensaver goes off, I want the counter to immediately show 150 - NOT 100, and then wait until the counter is next incremented, at which point it would show 151.
To do what you are describing, you will need to save the data somewhere. That could be a lot of data if the display has been off for very long.
As noted above, all I ever need to store is the current state of the display, which should be the size of the entire display buffer, correct? How can I find out how much that is? How can I write data to this "somewhere" during the time that the screensaver is on? How can I copy that data from "somewhere" back to the display's buffer when the screensaver goes off? These, I believe, are the questions that I need to find answers to, correct? And if I'm correct... does anyone have those answers?

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: A true screensaver for OLED display?

Post by adafruit_support_bill »

If you just need to display the current data then you don't need any additional storage. Just keep overwriting the old data with the new. And when the display wakes up, refresh it with the latest values.

User avatar
ba58smith
 
Posts: 14
Joined: Tue Oct 20, 2015 4:55 pm

Re: A true screensaver for OLED display?

Post by ba58smith »

adafruit_support_bill wrote: Wed Nov 16, 2022 8:47 am If you just need to display the current data then you don't need any additional storage. Just keep overwriting the old data with the new. And when the display wakes up, refresh it with the latest values.
Yes, I think that will work.

Now, the important question: how does one put an SD1327 OLED to sleep, and wake it back up? I don't see anything in any of the Adafruit libraries about how to do that. Thanks!

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: A true screensaver for OLED display?

Post by adafruit_support_bill »

There doesn't seem to be any direct support for it in the libraries. One method is to simply do a fillrect call to paint the entire screen black.

To turn it on and off at the chip level, see section 9.1.8 "Set Display Mode" in the data sheet:
https://cdn-learn.adafruit.com/assets/a ... 7_v1.8.pdf

User avatar
ba58smith
 
Posts: 14
Joined: Tue Oct 20, 2015 4:55 pm

Re: A true screensaver for OLED display?

Post by ba58smith »

adafruit_support_bill wrote: Thu Nov 17, 2022 10:08 am To turn it on and off at the chip level, see section 9.1.8 "Set Display Mode" in the data sheet:
https://cdn-learn.adafruit.com/assets/a ... 7_v1.8.pdf
Aha!!! That looks like the ticket! Thanks, I'll pursue that.

If it works, does Adafruit consider pull requests for its libraries? It would seem like having a screen saver capability for an OLED would be a nice enhancement.

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: A true screensaver for OLED display?

Post by adafruit_support_bill »

Yes. Github pull requests for library improvements are welcome.

User avatar
ba58smith
 
Posts: 14
Joined: Tue Oct 20, 2015 4:55 pm

Re: A true screensaver for OLED display?

Post by ba58smith »

adafruit_support_bill wrote: Fri Nov 18, 2022 8:46 am Yes. Github pull requests for library improvements are welcome.
Well, it works perfectly, so I'll make a PR. Thanks so much for your help!

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

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