It is a red board with Keyes OLED Automation written on it.
It is working fine with the standard I2C U8glib constructor for the SSD1306 controller (ACK and FAST Option).
However I have the issue that if the whole circuit has been off for a couple of hours then the display would show random pixel noise on turn on and it would be stuck in that configuration (cycling power doesn't help).
I found that the display itself is from Solomon Systech and that the reset pin is connected to the display's power via a bridge (labeled R4) on the display board. After disconnecting the bridge and connecting a wire to the reset pin the display would only turn on if the pin is held high and the noise can be cleared by unplugging the reset pin and putting it back to high and resetting the ATmega.
I've tried mimicking this behavior with a digital pin on the ATmega however the display would not turn on when using a pullup against the supply voltage and a high state pin. It would also not reset when pulling the pin low. It really only does clear when unplugging the reset pin.
I've tried a couple of resistors in the range from a few 100 Ohms to 0.5 MOhm for a pullup.
So VCC -> R_pullup -> digital Pin + display_reset only works if the digital pin is configured as INPUT - but then the display doesn't reset it only 'works' i.e. turns on.
I'm using a battery pack (2xAA) and a step-up converter to get 3.3 V to supply the whole circuit.
There is only a DS18B20, a tactile switch (for resetting the ATmega) + pullup in the circuit as other components.
I'm stuck at the moment and anything I would try from now on would be a guessing game and was hoping anyone can point me in the right direction.
just for completeness, as I believe I've reached a solution.
To make the display (as stated in the original post) compatible with this solution the display board needs to be modified.
R4 should be removed and a wire should be attached to either the pad on the flex-cable side of the R4 connection or directly to pin 14 on the flex-cable.
This is then the reset connection.
Then I've connected this to PD5 on the ATMega328P and added the following code which should force the display in reset on turn on and should be called in the setup() routine.
Note: I'm using the C-constructor as the C++ one wouldn't build and I didn't have time/mood to investigate that further.
For whatever reason the display wouldn't turn on if the pin was active high. Only when making the pin an input with pullup enabled it worked (chances are I am missing something but as this works now and I have the minimum amount of components this is fine enough for me).
I have the exact same OLED as you.
Nevertheless, the solution you provided does not work for me.
Is there any more steps to do, apart from the code ?
It worked for me to disconnect manually the vcc of the oled, then plug it again, and cycle power of the board. Unfortunately, as i'm working on an embedded application, i can't afford to manually unplug and replug.
Can the fact that i have 2 others i2c devices on my arduino be a problem ?
Thanks for your time,
EDIT: I found that if you connect a LED between +5V of the Arduino and the Vcc of the oled, it works just fine.
Read this thread (click!).
In reply 22 i communicated the solution i found for this problem.
I've been playing with some OLED modules by CRIUS, but this could have been very well been produced with other brands stamped on it.
Read the entire 7 page thread, it has a lot of interesting info.