SSD1306 128x32 OLED : Sleep mode, and power-up timing

Hi there,

Couple of questions around SSD1306 128x32 cheap oled display (I2C, 4 wires only)
It's working pretty cool for me now, using U8G2 and Arduino.
However, when trying to work out the power consumption figures, here come the issues.

First, it was impossible for me getting it into deep-sleep mode. My project is battery powered, so very low power during idle mode is a must. I tried the commands shown with no luck, still draining power (Im using step-up dcdc converter). Any help, suggestion?

So I tried to cut-off power when system goes to sleep, and yeah it worked fine. But then, I faced a new issue - when waking up, I need to hold on like 2 seconds till I can talk to my oled. In fact, I can talk anyway, with no answer. This is my problem here - can I somehow wait for some feedback when talking to the oled over the I2C? Otherwise, my system thinks screen is on but isnt. Arduino just operates the I2C without any feedback:

u8g2.begin(); // can't guess if the command will get through or not, will depend on the power-up timing....

Thanks so much for your help guys,


Don’t know if it will work but you could try Wire.beginTransmission followed by Wire.endTransmission in a loop and check the return value. End transmission indicates the status in it’s return.

See Wire - Arduino Reference

It worked like a charm.


Thanks so much for this trick man!!!!!