Closed Dreamy-Z3r0 closed 5 years ago
The DS3231 has a lostPower method that is similar. According to the datasheet the DS3231 sets a bit if the oscillator "either is stopped or was stopped for some period," so it sounds like it is always running if it has power but you can detect if it stopped for some reason.
When the module is not connected the result of the Wire read is 0xFF, running that through bcd2bin gives 165.
I'm currently working with the DS3231 modules as a part of a workshop. I think you may have missed .isrunning() function for DS3231 part when you created the library. Since you have it for DS1307, I've done some copy and paste from DS1307 to DS3231 and it worked. You may find it minor, but this is for some students, so I appreciate if you update the library. Btw, do you know why the data returned when the module is removed is all with 165?
modified library RTClib.zip