Arduino server codes

I currently have an arduino and ethernet shield. The arduino checks via udp the time where I live in order to run a time controlled program and a web server.

Do the spark cores support this with the basic arduino webserver code? Being able to access the server usin lan or via the cloud?

And does this have an internal clock in it? As arduinos need an extra module but as an m3 I would have thought it would have one built in?

Thanks for all your help, I have orderd my spark core but wont get it for 2 months and would like to start coding it up :slight_smile:


Hi @bigjme,

Yes the Core has an internal real time clock which will give you time since the core started up. The time isn’t saved between restarts, you can grab that value here: . Some members of the community have requested an easier way to have the core sync time with the server, and we’ve added that feature to our backlog.

You can also open ports on the core directly, or make TCP/UDP connections directly from the core. You can read about that code here: . @zachary is also working on a good local networking example that should help explain how to use those libraries.


Thank you for your quick response :slight_smile: look forward to seeing the update clock call. Would be great if it updated when it connects to the cloud

By a time controlled program I mean it checks the real time and only runs certain code between set times. This is for a motion light control so it prevents lights coming on between set times when you would say move in bed

The local communication example has been posted here:

1 Like

Thank you. I was actually only looking at it as I didnt understand the spark api properly which I now understand how to run commands and have the commands run off a php webpage. So until I can set up a mobile app for the functions I will just use a php webpage. Im controlling them from lan at the moment but having a secure webpage wouldnt make any difference and my code would almost half in size due to having no webserver codes :slight_smile: this cloud system is going to help me sooo much

I dont know why it was never thiught of before but I thank you for it. Now just to wait for the core to arrive so I can get cracking. Damn you import times!!!

1 Like