I have been using this IC in my scripts for arduino. I rely on it for any time stuff I have done. Now that I want to port my code to particle photon I wonder how I can to adapt it to work now.
I know that photon has an internatl rtc. I tried and it gives me the correct time as soon as it is connected to the wifi network. But if power is cut off or there is no internet. Time is lost. I see there is a vbat pin but I am not sure if the photon is powered with this pin, wifi still works or not (too much power consuming).
So, now I have my ds3231 powered by a coin battery. I want to have the same in my new device. So I can set the time when I solder the pcb and that’s all. Of course, if internet is available I will take time from there but in case there isn’t (wifi changed and no connection available, power cut…) I want to rely on my own device.
Is there any kind of library or working example around?