MajicDesigns / MD_DS3231

DS3231 Real Time Clock Library
GNU Lesser General Public License v2.1
30 stars 11 forks source link

initializing the RTC #2

Closed MohamedA95 closed 7 years ago

MohamedA95 commented 7 years ago

hi, thanks for the great documentation it is really helpful. I was looking for a way to initialize the RTC .for example if it lost power ,but i could not find any thing about it in the doc or the examples . could you help me about it? thanks in advance.

MajicDesigns commented 7 years ago

What do you need to initialise? The clock should keep running off the battery while the power is off (that is the point of the RTC).

MohamedA95 commented 7 years ago

Thanks for the reply. What if the RTC had wrong time ? Or if the battery lost power?

MajicDesigns commented 7 years ago

Then you need a mechanism using switches to set the time, just like any other digital clock. Have a look at the word clock in this repository.

MohamedA95 commented 7 years ago

But couldn't we set the time using pc time while uploading ? What repository ? Could you direct me?

MajicDesigns commented 7 years ago

Nothing is automatic. If you want a PC link to set the time you need to write software to do that. If you are using the time of the compile for the application software in the Arduino, then a reset of the hardware will reset to that time, which is only ever (nearly) correct the first time. For how to do any of this I would suggest that you join Arduino.cc forums and ask a question on the forum. It is not a library related issue.

The repository is this MajicDesigns github site - the one you are using to enter comments. Start from the MajicDesigns page (link at the top of this page) and then move to the Repositories. Look for the WordClock in the list.

MohamedA95 commented 7 years ago

oh,that explains a lot, thanks very much for your help i really appreciate it . thanks for that repository.