Weird problem when using the library for DS3231 to display time on SSD1306 OLED

I connected both DS3231 and SSD1306 to I2C bus vie A4 andA5 on Arduino nano. I am able to initialize both in the code. I can display stuff on the display and I canread time into e.g. serial monitor.
This library has a cool funcion clock.dateFormat that make formiating time and date really easy.
But here is the problem.

When I try to call this function OLED display does not initialise with the message
SSD1306 allocation failed

Any idea what may be a problem here. The library I am using is

There was some issues reported in forum

There was a fix there to install which fixed reported issue but still my issue is not resolved

Any idea what the problem may be?

That sounds like a pretty fundamental error. You might try using a library that works - of which there must be several. The name Christensen springs to mind. If you just want to tell the time, another option is to not bother with a library at all.

https://bildr.org/2011/03/ds1307-arduino/

which may be all you need for a DS3231.

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