RTC_DS1307 RTC; I see what it is about but what does it do?
It creates an instance of a class. Clocks are generic items. They all perform the same basic tasks, but the clock on the wall in your living room is a specific instance of the generic class clock. In the same way, RTC is an instance of the RTC_DS1307 class.
time_t syncProvider() //this does the same thing as RTC_DS1307::get() !! What is the thing?
It is a function. The name is not specifically meaningful. In this case, it is a function that is to be called when the RTC instance really needs to know what time it is. It performs a synchronization between the RTC instance's understanding of the time and the hardware's understanding of the time.
Unix time is the number of seconds since 1st Jan 1970.
Yes.
So does this read from the RTC that number of seconds, at that moment, so that date and time can be calculated and printed?
No. Your wall clock has no idea when January 1, 1970 was. The RTC class does, though. It can convert between the time it knows (like your wall clock) and the time of that Unix understands that time began, as a way of exchanging time information with other systems that have different understandings of time.
uint32_t syncTime = 0; // time of last sync() Sets the time of the last sync to current (RTC) time?
This defines the last time that the RTC instance checked with the hardware to update the instance's concept of what time it is to match the hardware's understanding of what time it is.
I believe something causes the Arduino time to be synced with the RTC time at 5 minute intervals – presumably from the RTC library?
Yes. There are ways to define how often the syncing happens. If the Arduino is pretty accurate, and the cost of getting the correct time is high (as in getting time from an NTP time server), then the interval should be long. If the Arduino isn't very accurate, and the cost is small (as in accessing the DS1307 hardware) the interval should be small.
If the RTC has not got a running time, it is updated with computer time? If a computer is connected.
No. If the RTC is not running, start it running with the time and date that the sketch was compiled. This assumes that the clock is new (and, therefore, not yet running), so the clock is started running with the compile time (which might be a few seconds late).
Eh? Where is “(syncProvider)”.
syncProvider is the name of a function (the one you asked the first question about). That function will be called whenever a sync is to happen.
What does this DO?
It defines how the Arduino is to synchronize it's concept of time. The specified function will be called.
So the two calls are similar but must be different or the change would not have been made.
I don't understand the question. The setSyncProvider() function registers a callback. The syncProvider() function is called at specified intervals.
If you still have questions, feel free to keep asking.