ssd1315 OLED

Hi all,

I’ve managed to get the ssd1315 OLED working using the u8x8 library. However, after I send a command to anything else on the i2c bus the oled panel will no longer respond to commands. I’ve verified that the program continues to run by using the serial monitor.



The sensors I’m using are the SCD30 and the sgp30. It looks like they all have different addresses, and they all show up using an i2c finder.



Anyone else run into this problem? On other forums someone mentioned something about a reset pin, but I don’t see how that applies here.



Thanks!

So an update,



The code hangs when I try to initialize the scd30. I get the “Step 1” on the OLED, and the “Step 1” on serial, then nothing. Going to look through the scd30 library code to see if there is a potential conflict with the u8g2 library.

[code]
U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=/ SCL, / data=/ SDA, / reset=*/ U8X8_PIN_NONE);

void setup() {

Serial.begin(115200);

u8g2.begin();
u8g2.clearBuffer();
u8g2_prepare(); // same as in the graphics example
u8g2.drawStr( 0, 0, “Step 1”);
u8g2.sendBuffer();
delay(1000);

Serial.println(“Step 1”);
delay(1000);

scd30.initialize();

Serial.println(“scd30: complete”);
delay(1000);

[/code]

Realized I forgot the Wire.begin(). Now the code will continue past the scd30.initialize(), but I still do not get anything new on the OLED.



Edit: Just calling Wire.begin() is enough to get the OLED to stop responding.

After some google fu:



My OLED does not work with hardware i2c. Seeed people, is this normal?



I found a solution here:

https://forum.arduino.cc/index.php?topic=490358.0



I need to sandwich calls to the OLED with Wire.end() and Wire.begin(). It seems like this is an issue with hardware vs. software i2c.

Several months ago we ordered some displays from the Far East and we expected them to work just fine. Unfortunately, they did not. And the problem was not in our library but with the chips. Instead of SSD1306, it seems they put the not that well known SSD1315 OLED display controller. We found that out by looking closely at the PCB, beneath the LCD glass plate.



On another display that we’ve got earlier, a few years ago, and that was using the SSD1306 controller the picture was looking good. SSD1306xLED Testing SSD1306 OLED display controller.

Apparently, the problem was with the display controller. Further experiments proved that. What made it worse for us was that we’ve discovered that from about a hundred display modules we’ve ordered recently half seemed not compatible with our code. We couldn’t even figure out what exactly was the OLED controller on those modules –SSD1306 as stated in the description where we bought them, or the SSD1315 looking at the testing scripts results. So, we decided to just fix the problem for both kinds of chips.