Go Down

Topic: Arduino Read system date and time (Read 9504 times) previous topic - next topic


Hi all,

I'm trying to find out how to get Arduino to read the system date and time so i can then display it on an LCD.

Would be grateful for any help.



Write a program that runs on your computer in a language you know.
Make it send the system time over the serial.
Have arduino listen for input, and display it.

OR use this: http://www.mikmo.dk/gobetwino.html


Oct 17, 2009, 09:01 pm Last Edit: Oct 17, 2009, 09:01 pm by mem Reason: 1
or you can use this library to manage date and time: http://www.arduino.cc/playground/Code/DateTime

It can be set using a program running on the PC (a Sketch for doing this is provided in the download) or you can use a few buttons to set the time.

If you don't mind connecting some additional hardware you can use a external real time clock: http://www.flickr.com/photos/sjunnesson/3344651050/


If you decide you want a hardware solution take a look at the
schematic in my NB1A datasheet  -- http://tinyurl.com/y8exe7k
I use the DS1337 which has two time-of-day interrupts.

There are some software examples in the application hint section.

(* jcl *)


Hi Mem,

I tired the DateTime library. The file comes in 2 different libraries DateTime & DateTimeString.

The DateTimeString libaray seems to be Valid, but arduino does not see the DateTime library as being a valid libarary file.



? arduino does not see the DateTime library as being a valid library file.

Make sure that the DateTime files (DateTime.cpp and DateTime.h) are in a directory called DateTime that is a subdirectory of your libraries directory.

Are you getting an error message and if so what is it?


Hi all,

I'm still struglling with this, I've used the Exaple sketch and i've madre sure the libraries are in the right place.

The sketch uploads ok, with no errors, but when i run the serial monitor i get nothing being displayed at all.

All i want to do i ready the time and dat from my laptop.


Ribuck, are you running the Processing sketch on the computer that the arduino is connected to?  Arduino runs a sketch called DateTime.pde that receives messages from your computer with the system time. These message are sent from a Processing sketch called SetArduinoClock that reads the system time when the Processing sketch is clicked and sends this to Arduino . Are you running SetArduinoClock on your computer (its in the examples/Processing directory)?  

Go Up