Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: TimeTeensy3 Question - "processSyncMessage" - WOSSAT?

  1. #1
    Junior Member
    Join Date
    Oct 2019
    Posts
    2

    TimeTeensy3 Question - "processSyncMessage" - WOSSAT?

    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...
    Attached Files Attached Files

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,682
    Quote Originally Posted by MrNixie View Post
    Is there aPC program I need to run?
    Yes, you're supposed to run this program on the PC side.

    https://github.com/PaulStoffregen/Ti...duinoClock.pde

    It runs on Processing, which is similar to Arduino but the programs run on your PC.

    https://processing.org/

  3. #3
    Junior Member
    Join Date
    Oct 2019
    Posts
    2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •