Have to upload OLED Display program after every power down

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Kelly1234
 
Posts: 8
Joined: Fri Oct 23, 2015 6:41 pm

Have to upload OLED Display program after every power down

Post by Kelly1234 »

Hi,
I'm new to Arduino so forgive me if this is a stupid question or I posted this is the wrong section. I have a QT PY (SAMD21) with no added memory. I'm programming using Arduino IDE. When I upload a program like blinking an LED it works perfectly. When I unplug the power and plug it back in the LED immediately starts blinking like I would expect. I also have a 0.91" OLED monochrome display with STEMMA connection that I am trying to write one, simple message. When I upload the program everything works as expected but when I power it down and then back up I get a blank screen instead of the message that I was expecting. If I reload the program it will work just fine but as soon as I power it down it's like the program/sketch gets wiped away and I have to start from scratch. Even when I use Adafruit's example program I have the same issue. Can anyone help explain to me what I am doing wrong? Thank you.

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Have to upload OLED Display program after every power down

Post by adafruit_support_carter »

Probably just needs some added delay to deal with power on conditions. Like waiting for the OLED to be ready before trying to talk to it from the QT PY.

Is this the example program you are running?
https://github.com/adafruit/Adafruit_SS ... 32_i2c.ino

User avatar
Kelly1234
 
Posts: 8
Joined: Fri Oct 23, 2015 6:41 pm

Re: Have to upload OLED Display program after every power down

Post by Kelly1234 »

Yes, that is the Adafruit example program I have used. Do I need to add a time delay in the setup()? How much time would I need?

User avatar
adafruit_support_carter
 
Posts: 29056
Joined: Tue Nov 29, 2016 2:45 pm

Re: Have to upload OLED Display program after every power down

Post by adafruit_support_carter »

Try that and see if it helps. And start with something long-ish, like:

Code: Select all

delay(500);
That can be first line setup(). If it works, then can try reducing it to see what the minimum is.

User avatar
Kelly1234
 
Posts: 8
Joined: Fri Oct 23, 2015 6:41 pm

Re: Have to upload OLED Display program after every power down

Post by Kelly1234 »

Thank you, that did it. After some trial and error it looks like a minimum delay of 120ms is needed. Thanks again for the help. I appreciate it.

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

Return to “Other Arduino products from Adafruit”