Multiple I2C,SPI,Onewire problem

Hi, I have a problem with the OLED display from ADAFRUIT no longer showing up when I run my program. I have made a tester of three different temperature sensors and I use both the I2C bus and SPI and OneWire in parallel. When I test the sensors individually, the display works as it should, but when I put the whole program together, the display does not work. I tried the serial report in every step both in the menu and in the individual testing and it works, it just doesn’t appear on the display.

Code : #include <Adafruit_GFX.h>#include <Adafruit_SSD1306.h>#include <OneWire.h> -

Please post links to your actual hardware.
Please post the name of your Arduino board
Please paste or attach your sketch. Code icon is 6th icon, Upload is 7th icon in the horrible editor window.


Arduino UNO board
Adafruit oled 0,96" I2C
GY-31865 MAX31865 Modul, SPI bus, for measuring PT100
Adafruit MCP9600 modul, I2C bus, for measuring thermocouple type K
DS18b20 by OneWire bus

Code on pastebin: #include <Adafruit_GFX.h>#include <Adafruit_SSD1306.h>#include <OneWire.h> -

Your Adafruit_SSD1306 object will steal 1024 bytes of SRAM at runtime.

You have an awful lot of anonymous strings e.g.
display.println("Podpeti / prepeti");
as well as a lot of variables.

Put the anonymous strings into Flash with F() e.g.
display.println(F("Podpeti / prepeti"));

Observe how much dynamic memory (SRAM) is available at compile time. You need about 1200 bytes to be safe (i.e. to allow for OLED buffer).


Edit. Is there any way to stop email notifications?
Otherwise I will stop answering questions on this Forum.

If you go into your profile in the top right corner, Preferences, Email there are options to choose whether to receive email notifications when someone tags you, quotes you, and so on.

(With apologies for the fact that my have generated another email).

Yes, I received another email !

Thanks for the tip. I had “denied Notifications” but it does not seem to make a difference.
I have set “Never” for every type of Email, Notification, …

With the old Forum software I could just check Displays, Every, Zero, Due Forums.
One glance would show new Public messages.
Any new Private Message appeared too.

Job done. Nowadays you put your life in jeopardy if you reply to a question. You have to navigate back to the specific Forum. You get constant emails…

The only “plus” is that the Editor raises my Blood Pressure. (which is good because I have naturally low Blood Pressure)

Regarding your problem. Reduce unnecessary SRAM. Your Uno only has 2048 bytes of SRAM.


Thank you very much… F() really helped !

This topic was automatically closed after 120 days. New replies are no longer allowed.