Has anyone already operated 2 OLED displays in parallel with the Adafruit_SSD1306 lib? It doesn't seem to work. Only the 1st OLED is addressed, the 2nd receives no data via the bus. If I comment out the 1st OLED, the 2nd OLED also works. Can the lib run in parallel? Yes, the modules have different addresses 3c, 3d.
Two OLEDs should work fine if you have different I2C addresses.
Note that each OLED will require 1024 bytes of SRAM. Which means that it will not work with a Uno.
If you want two OLEDs with a Uno, use U8g2lib with the small buffer 1 constructors.
U8g2lib can do most things that Adafruit_SSD1306 can do (and more)
However the methods have different names and calling arguments.
I2C device found at address 0x3C !
I2C device found at address 0x3D !
Remember that device I2C addresses comes in pair. There's the WRITE_ADDRESS and READ_ADDRESS. It's possible the two addresses above are the write and read addresses of a single I2C device
hzrnbgy:
I2C device found at address 0x3C !
I2C device found at address 0x3D !
Remember that device I2C addresses comes in pair. There's the WRITE_ADDRESS and READ_ADDRESS. It's possible the two addresses above are the write and read addresses of a single I2C device
SSD1306 has 7-bit I2C Slave Address of 0x3C or 0x3D
SSD1306 has 8-bit I2C Slave Address of 0x78/79 or 0x7A/7B
Arduino Wire.h library always uses the 7-bit Slave Address.
The OP could have just revealed which particular Arduino board she was using. In which case there could be a simple unequivocal answer regarding Adafruit_SSD1306 dynamic allocation of SRAM at runtime.
I don't use the Wire.h library or any Arduino libraries for that matter so that tidbit of information is new to me. I did put this qualifier on my statement
It has been a long standing Gotcha for anything I2C. Some datasheets and libraries use 8-bit address others use 7-bit.
What really irritates me. Hardware datasheets seldom put the Slave address on the front page.
The very first thing that you want to know about some fancy new chip is the Slave Address.
You have to search for this information. And then compare the text value with any timing diagram to see whether the text refers to 7-bit or 8-bit value.