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

Thread: unable to use setSyncProvider for teensy41 in platformIO

  1. #1

    unable to use setSyncProvider for teensy41 in platformIO

    Hello world,

    I recently got myself some sweet teensy41 for a project.
    The main reason was that it has everything on board to build a quick data logger with timestamp.

    Having good experiences in the past with TimeLib I decided to give it a go.
    However, I ran into an issue:

    Gives me the following error:
    src/main.cpp: In function 'void setup()':
    src/main.cpp:6:19: error: 'getTeensy3Time' was not declared in this scope
    *** [.pio/build/teensy41/src/main.cpp.o] Error 1
    I can set the time using setTime just fine, it's just a hassle as I have multiple devices that I need to update every now and then.
    Does setSyncProvider not work for teensy41?

    I am using:
    A teensy41 straight out of the box, only a micro-usb is attached
    VS code
    The latest version of platformIO (updated it today)

    Can someone shed some light on this conundrum?

    Kind regards,


  2. #2
    Join Date
    Aug 2018
    Brisbane, Australia
    What happens if you add this to your source file
    time_t getTeensy3Time() {
    	return Teensy3Clock.get();

  3. #3
    Worked like a charm, can't believe I missed that >.<

    Thanks thebigg~

Posting Permissions

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