TimeTeensy3 - Serial functions..

Status
Not open for further replies.

MogaRaghu

Well-known member
Came across two Serial functions in the TeensyTime3 example. I was happy to see it pick up the PC time ... so easy to set the RTC. I do hope that the RTC is updated with this and if I have a battery back up on my Teensy3.5, i have a clock running ??

Code:
  if (Serial.find(TIME_HEADER))
  {
    pctime = Serial.parseInt();
    return pctime;
    if ( pctime < DEFAULT_TIME)                 // Check the value is a valid time (greater than Jan 1 2013)
    {
      pctime = 0L;                                    // Return 0 to indicate that the time is not valid
    }
  }

I was trying to study the Serial.find() and Serial.parseInt(). Checked the usual places where the libraries are put - but could not locate. Where are they ?
 
You get nothing when the search is wrong !!

Here?: (Arduino)\hardware\teensy\avr\cores\teensy3\Stream.cpp

Well don't laugh... I was searching for Serial.cpp and Serial.h and no wonder I never bothered to look the Stream stuff :(. Thanks for pointing out the mistake.
 
Status
Not open for further replies.
Back
Top