Loading

Report as inappropriate

You can use this lib: https://github.com/NorthernWidget/DS3231
It has sample code to set/read the time, it can even retrieve actual temperature.