How to set RTC on Teensy 4.1?

nAnd

Member
This seems like a dumb question, but I've done a good bit of research and still haven't come up with an answer. All I'm trying to do is get my teensy 4.1's clock to sync to my laptop's time at first boot, but I haven't found a clear answer for how to do it yet. Can someone point me in the right direction?
 
@nAnd:

From the Arduino IDE, open, build, & run the example sketch titled "TimeTeensy3", which shows how to accomplish syncing the RTC inside the T4.1 (assuming you have a battery properly wired up to it) with local time in the T4.1. And, to go along with that, local time in the T4.1 is set from the PC each & every time that you upload a new program to the T4.1.

You can then include the pertinent parts in your own sketches to apply the same syncing when your sketch is loaded/running.

Hopefully that answers the question that you were asking . . .

Mark J Culross
KD5RXT
 
Sorry, but where do you find the TimeTeensy3 file? I haven't been able to find that anywhere.

Edit: I found it and it works! Thank you so much!!!
 
Back
Top