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 ??
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 ?
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 ?