I2C OLED possible Ethernet shield conflict?

I am running and Arduino UNO and trying to integrate these three processes.

  1. OLED via I2C, using Adafruit_SSD1306, and Adafruit_GFX and Wire.h libraries (pins A4&A5)
  2. Maxbotix Ultrasonic sensor running serial via SoftwareSerial.h (pin D2)
  3. Ethernet shield using SPI.h and Ethernet.h libraries

I can run the OLED and the Maxbotix together with no issues.
I can run the Ethernet shield and the Maxbotix together with no issues.
I can NOT run the Ethernet and the OLED
and as such..
I can NOT run all three.

This points to a possible conflict between the OLED and the Ethernet.

Any ideas on this?

I have included a copy of the code for the example trying to run the OLED and the Ethernet

Any help greatly appreciated!

TinyScreen4_wEther.ino (3.95 KB)

If i remove or comment out everything thing out of the sendGet function, all is well.
Or if I comment out the call to the sendGet function, all is well.

It appears to lockup when executing Ethernet.begin

Has anyone out there ever successfully deployed an I2C OLED with an Ethernet shield also?

Which Ethernet shield?
The clone with the Ethernet and microSD card slot uses SPI so there should not be conflict with I2C or SoftwareSerial.

.

Maybe it is not the I2C, which causes the problem, but instead the fact, that Adafruit SSD1306 library requires a lot of RAM. Did you get any warnings related to low RAM memory?

Oliver

Hmmm..Where would I see memory errors? I do not see any upon compile/upload.

rjdelbulk:
Hmmm..Where would I see memory errors? I do not see any upon compile/upload.

It should be mentioned in the log output. But it is not an error, more like a warning.

You could try u8g2 (page buffer or u8x8) for your display, which should require lesser RAM.

Oliver

whoohoo!
I just uploaded it (as is) to a MEGA 2560 (clone) and it works fine.
So...memory may have been the culprit. (although I2C is also on different pins (20/21), pins not even on the ethernet shield.