PC -> Arduino comms after PC boots.

As the Arduino hardly uses power, and some of the USB ports stay powered even when the PC is "turned off", I am working on an Arduino clock.

When the PC boots, it sends the time to the Arduino, or when I double click the icon on the "desktop".

As the Arduino would have a fixed COM port, it shouldn't be too difficult, and I know it is also the PC side, but how would I go about making the program for the PC?

I've seen sketches which allow time to be set via the "debug" window. So I am guessing all I need to do is - after the PC has booted - have a program run and send the time string to the COM port and the Arduino would then get the time.

My solution: insert the following line into the file /etc/rc.local

date '+%H:%M:%S' > /dev/ttyACM0

This works for Linux, for Mac OS X you have to modify it a little bit and on Windows it's quite a bit more complex, take a look at Processing, seems to be the easiest way to get serial communication done on that OS.

Thanks much Python.

Appreciate that a lot.

Shall investigate that more.