Internal Real Time Clock Library?

I’m working with a buddy of mine on a remote car starter conversion from his arduino to the spark core. It already uses an external Real Time Clock to start his car every morning at a pre-programmed time, which is displayed on an LCD.

Currently I’ve taken the Simple Spark Core Controller app that I whipped up last night and configured it to work a sketch that does the low level control of the remote starter and other buttons (trunk, lock, unlock).

The last piece of the puzzle will be incorporating the Real Time Clock functionality into it, and I’m wondering if setting up the internal RTC library is something that is on one of the upcoming sprints?

Here’s a screenshot of the remote starter app if anyone is interested as to what you can do with the above mentioned app.

I can post the sketch if anyone is really interested, but the web app above does have an example sketch that goes with it so you can see how to hook up the buttons.

1 Like

I was thinking that a sort of interim solution might be an NTP client. The Spark UDP stuff isn’t documented yet, but I may try to see what I can come up with while the kids nap this afternoon.

1 Like

I was thinking along those lines as well, as long as it’s going to be on the Wifi all of the time. The only thing is I wouldn’t want to be polling a server too often, so I would still have to set up a local timer… just re-syncing every 24 hours. Thanks for your interest in this!

1 Like

Without the documentation, I don’t think I’m going to get too much of anywhere on that front. I started to try out using the TCPClient with, but the TCPClient example didn’t seem to want to work as intended. I’ll hack more on it this evening. I think I need to take a break from coding and holiday cleanup and check out my latest Steam sale purchases. :wink:

I know we’ve been talking about adding support for syncing the clock more easily. You guys probably saw this already, but there is a great Arduino NTP example here: . I haven’t tried this personally, but maybe @mohit or @satishgn could shed some light on the state of the UDP libraries, or just if something like this would work?


I posted about my new time library over here:

1 Like

You could set up a cron job on a remote server to call the “start engine” function at the desired time, rather than relying on the Core for keeping time. Obviously there are other benefits to having an RTC library directly on the device, but maybe not as necessary in this instance.