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
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.