TimeTeensy3 Question - "processSyncMessage" - WOSSAT?

Status
Not open for further replies.

MrNixie

New member
Hello All, noob here, so please be gentle.

I've been hacking about with Arduinos a for couple of years, and needed to step up a gear for a new project I have been working on. A Teensy 3.2 just fits the bill perfectly! I have added a timing crystal and backup battery, and all looks to be well.

I am having a couple of issues (of my understanding) around Teensy time. I've been through the stock (i.e unchanged) example TimeTeensy3 (which compiles and runs fine, albeit without picking up the right tiem). But I cannot fathom the stuff around processSyncMessage. I guess this function is supposed to return a long int of seconds, since 1970, but I cannot figure out how it works. How does the attached PC know to do this? Is there aPC program I need to run?

I have had to set the Teensy RTC time manually, whereupon the system keeps good time and retains it through main power downs overnight, rebooting successfully with the correct time as expected the following day, so no problems there. It's just getting the time from a PC via USB that I cannot figure.

I have read through the help pages, delved a little into the libraries themselves, but am yet none the wiser :(

Help...
 

Attachments

  • TimeTeensy3.ino
    1.8 KB · Views: 49
Hi Paul, thanks for taking the time to reply to me in person! I really appreciate that.

OK - I had no idea that "processing" even existed! I see how it is the missing part to the puzzle now. I kinda got it all working, though the PC/Processing app seemed to want to argue with Arduino/Teensy3.2 over who had access to the COM port... :(

But I think I get the gist of it now. Syncing to a pc is a little more complex than I'd perhaps naively expected and, while I can see how it works now, I think I may develop a routine to allow the user to set the date and time in my Teensy code instead (I have a front panel keypad and display to boot). After all, hopefully it wont be a regular occurrence...

Thanks again.
 
Status
Not open for further replies.
Back
Top