SSD1306 OLED Screen turns off or goes to sleep?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

SSD1306 OLED Screen turns off or goes to sleep?

Post by voodoochemist »

Hi,
I'm using an SSD1306 OLED 128x32 SPI. http://www.adafruit.com/products/661

I can't figure out why it keeps shutting off after about 2-10 minutes. I don't think the shutoff time is exactly consistent, but it's generally off after 3 minutes. Is there a sleep function that I can turn off?

I have tried to isolate if there is a conflict with something in my code, such as another device library, but I have my sketch really simple at this point: it's just the OLED and an UNO, and the OLED still goes off.

Help!

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

Re: SSD1306 OLED Screen turns off or goes to sleep?

Post by adafruit_support_bill »

What turns it back on? Resetting the Uno?

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: SSD1306 OLED Screen turns off or goes to sleep?

Post by voodoochemist »

Correct, pressing reset turns the screen back on.

voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 3:47 pm

Re: SSD1306 OLED Screen turns off or goes to sleep?

Post by voodoochemist »

I divided up my code into functions and now the screen is staying on. I must have had some overlapping code that was causing the screen to shut off. Thanks. Rule of thumb: when you're sketch gets complex (about 10 different routines going on) it's a good idea to divide up the code into functions.

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

Return to “Arduino”