I bought this, 0.91″128×32 IIC I2C White DIY OLED LCD Display Module 3.3V Fr PIC Arduino Hot im and connected it to an Arduino Mega, SDA/SCL/GND and connected to 5V and thought that I had broken it.
Then I read this: Does someone got this OLED working? –> 128×64 Display Module SSD1306, says that I2C doesn’t work, but SPI does, however it is the wrong display as it is for the 0.96″, not 0.91″. It also mentions:
Software: U8glib supports SSD1306…
Then SSD1306 OLED driver, looks good (SPI and I2C)
As Julian points out, the display board, even though it is advertised as 3.3V, the IC U2 is a 3.3V regulator, so 5V is probably OK:
I connected the display to an Uno, and wired as per Julian’s video. I used the U8glib, not version 2, on Arduino IDE 1.8.3, ran the “Hello World” example and it worked fine, using the I2C HW, SDA and SCL pins:
U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // I2C / TWI U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); // I2C / TWI
Re-running the I2CScanner now gives the address 0x3C.
After reconnecting to the Arduino Mega, I realised that I had not actually powered the display at all, as the breadboard power rails were not linked and so the… well, it is obvious really.
So, now re-running the Adafruit example, ssd1306_128x32_i2c.ino, on the Arduino Mega, even though I have no reset pin connected, or available, it works fine. However, a lower portion of the display seems to be missing:
See also Update: u8g2lib and the 128×32 OLED, for a less panicky video:
Using u8g2, the same half screen effect:
New minimalistic library for 128×64 I2C OLED displays, Adafruit’s SSD1306 library is too heavyweight