Time Library loses correct time when sync is lost

Hello All,

I am experimenting with the Time Library and using the TimeSerial sketch which syncs through Processing.

It syncs fine and gets the correct date (2014 etc) but when I close the serial monitor or the Processing sketch it loses this and seems to reset to 1970!

Simple question: Is there a way to sync the arduino with the computer and then disconnect it so it ticks away by itself, or do I need to have a persistent connection, or get an RTC chip and use the RTC part of the Time Library?

Thanks,

David

RTC is the easiest way to go.

Simple question: Is there a way to sync the arduino with the computer and then disconnect it so it ticks away by itself

Closing the Processing application closes the serial port, which resets the Arduino. There are ways to prevent that from happening, discussed in an article on the playground.

Thanks for the clarification guys! I'll have a rummage for that article...

davidhunter:
Thanks for the clarification guys! I'll have a rummage for that article...

http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection

Much appreciated, PaulS.