I have tried a forum search on "RTC is NOT running!" but of course this is in the setup of every sketch that members have posted, so most posts are about other issues.
I have built a safety display that tracks days since last accident, and days to next goal.
It is solar powered , and I have a DS1307 RTC so that I can update the number of days at midnight ( I know it will drift a bit, but as long as its in the middle of the night thats fine )
Should there be no sun for a couple of days and the battery goes flat, I have both target days saved in eeprom as unixdays, so it will automatically update the right number of missed days.
The guy I have built it for is collecting it this morning at 9am, but when I got up at 4am ( as one does on Sundays being self employed ) I saw that the days had not changed at midnight.
I took it all apart again and hooked up to the pc, and got the error message "RTC is NOT running!"
I am using the #include "RTClib.h" library, and tried uploading a couple of simple readtime examples, and each time it said the RTC wasnt running.
The battery is 2.8v still, but it had been powered all night from the battery anyway.
I then tried Nick Gammons 12c scan, and it showed me the address as 0x68.
As there is no address shown in the code, I assume that is in the library, but when I added
#define DS1307_I2C_ADDRESS 0x68 it sprang back into life ..
I tried commenting out the line and it worked fine again, as did the simple checktime codes.
I have left the line in there now, and if it wasnt for the fact that the guy has driven 1000 km to Cape Town for the weekend and going home today, I would have bought another chip and crystal on Monday.
Has anyone had a similar experience? and will that extra line be OK?
Code attached
forum.pde (7.97 KB)