Hello,
I've searched but haven't found anybody with same problem as me.
I'm using Arduino Uno R3 (also tested on Pro Micro, same problem) and two i2c 0.96" SSD1306 OLED Displays, one resoldered to 0x3D address.
i2c scanner sketch finds both 0x3D and 0x3C displays, wiring and resoldering is done fine.
The problem is, that I can initialize only one display at a time. I'm using Adafruit's libraries to drive them -
Wire, Adafruit_SSD1306 and Adafruit_GFX, but I can't manage to make both of my displays work at the same time. Let me picture it for you:
#define OLED_ADDR 0x3C
#define OLED_ADDR2 0x3D
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display.clearDisplay();
drawToyotaLogo(); //custom function to draw bitmap
display.display();
= results in display 1 to show toyota logo.
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR2);
display.clearDisplay();
drawToyotaLogo(); //custom function to draw bitmap
display.display();
= results in display 2 to show toyota logo.
Fine, right?
display1.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR);
display2.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR2);
display1.clearDisplay();
display1.display();
display2.clearDisplay();
display2.display();
~anything to display
= results only in display 1 to show anything.
When I change the adresses around, only display that was .begin first in the code works.
I can run them like that:
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR1);
display.clearDisplay();
~
display.display();
display.begin(SSD1306_SWITCHCAPVCC, OLED_ADDR2);
display.clearDisplay();
~
display.display();
But everytime I switch displays in the code, they have to be cleared etc. and it makes them blink, which may be annoying at night in the car and I don't want that.
Do you have any clues what can I do? Any sketch from two-display tutorials that I load is not working as it should as well.