Using DS3231..h Library


I have been trying to use DS3231( I2c) with DS3231.h library to display date, time etc on the serial monitor and have “giberesh” data showing up on the screen. I have done this project earlier and worked fine interfacing with a 16 x 4 LCD display.

I used the Library from

I recently upgraded IDE 1.8.1. and I am not sure if this is the issue.

Will really appreciate help guide me on the right Library to use with the DS3231. My sketch of my working earlier project attached.

Thx in advance.


LCD Clock Sketch.txt (7.23 KB)

My sketch of my working earlier project attached.

Why? That is not the sketch you are having problems with, is it?

Yes. The output is really vague. Does not display the right data as written to the ds3231. Have something like 615/ / 615 as date !!! Quite confused. I think with the new ide, the library does not work.

Try reverting back to the old IDE version. If the problem goes away then that will verify the cause.

I guess i will look for an alternate Lib instead, there is one MD_DS3231 which i should check out, a lot of re-coding may have to be done. Staying updated with newer IDE may help with future products, projects, Hopefully. THX for your input.

I wasn't suggesting that you shouldn't use the latest version of the Arduino IDE, only to temporarily use an older version to narrow down the cause of the issue. For all we know this is a hardware problem and updating the IDE has nothing to do with it. What was the previous version of the Arduino IDE you were using? You have to approach these things as if you were a detective. Any clue, no matter how small, can be one step closer to finding "whodunnit". Even if a test is negative it's still helpful because it eliminates one possibility.


Thanks for your suggestions and like your comment "playing detective". Ha.ha..

What I did was to check for DS3231 hardware issues and did find out the sketch was unable to detect the I2C address so it wont see the DS3231 at all .. a sure bomb, and the device wont work...I have not checked the EPROM side of it. Basically needed the clock. Will fetch a new one and try.

I loaded up a I2C scanner from:

May be a useful sketch in hand when you have issues with I2C interfacing or detecting devices in the chain.

Will let you know how it goes.


Wooo.. Your playing detective was indeed cool .. guess what "a faulty jumper cable" .. THX .. Now i will check every thing going out of the Aurdino. Thanks friend.