Getting PC time to Arduino Uno

Hey, I'm trying to figure out how to use the Time Library and get the current time onto my Arduino through USB.
I've found the TimeSerial.pde example but it mentions that "A Processing example sketch to automatically send the messages is included in the download", is this scketch a program run by the PC that sends the time info to Arduino?
And where do I find this sketch? I've downloaded the libraries using the teensyduino installer.

Can anyone help me with this? Is there maybe another way to get the current time without having to buy anything?

EDIT: Actually I've found the sketch, it is named SyncArduinoClock and is found under Processing, and it needs to be run with Processing, not with arduino :stuck_out_tongue:

On the Arduino Sketch, TimeSerial.pde I get this error

C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_47798\TimeSerial.ino: In function 'void processSyncMessage()':

C:\Users\Admin\AppData\Local\Temp\arduino_modified_sketch_47798\TimeSerial.ino:68:29: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   if(Serial.find(TIME_HEADER)) {

                             ^

On the serial Monitor I still get the "Waiting for sync message" message but when I send the sync message with SyncArduinoClock it doesn't update, maybe I just need to know which port it is connected to

US$2 is too much money to spend on an RTC?

No probably not, but I want to try it out this way, just for the sake of it.

You're not trying to compile the processing sketch under C/C++, are you?

Actually I was ahahah, figured that out, now read above, I think I need to figure out to which port is it connected and I still have some compiling errors in TimeSerial.pde
EDIT:Ok Arduino seems to be on COM4, but when the Process tries to connect it says the COM4 port is busy

Ok I just needed to close the open Arduino program, now my arduino is syncing with the PC, last thing I hope is how to include the TimeSerial.pde inside another program, I'm not a programmer so I don't know how to do that

last thing I hope is how to include the TimeSerial.pde inside another program,

You can't. You use the technique(s) and relevant portions of the code in other programs.

I'm not a programmer so I don't know how to do that

Then why did you buy a microcontroller that needs programming?

PaulS:
You can't. You use the technique(s) and relevant portions of the code in other programs.
Then why did you buy a microcontroller that needs programming?

I'm doing a project for school, and it's not that I'm not willing to learn it, it's just that right now I'm not very good at C++

Actually I've managed to make a LED blink as many times as the current hour, that seems to work, but when trying something a bit more advanced the time stops syncing

but when trying something a bit more advanced the time stops syncing

That is a hand-waving statement. There are no concrete facts in the statement.

Some code that illustrates the problem would need to be posted.

I managed to fix it by myself, thanks for the help anyways :slight_smile: