SSD1306 OLED Screen turns off or goes to sleep?

by voodoochemist on Sun Mar 31, 2013 4:28 pm

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!
voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 2:47 pm
Location: East Village, NY

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

by adafruit_support_bill on Mon Apr 01, 2013 4:38 am

What turns it back on? Resetting the Uno?
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

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

by voodoochemist on Mon Apr 01, 2013 7:32 pm

Correct, pressing reset turns the screen back on.
voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 2:47 pm
Location: East Village, NY

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

by voodoochemist on Fri Apr 12, 2013 11:26 pm

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.
voodoochemist
 
Posts: 12
Joined: Fri Mar 01, 2013 2:47 pm
Location: East Village, NY