4

I'm trying to retrieve / synchronize time from PC using this Time lib function:

setSyncProvider( requestSync);  //set function to call when sync required

It sends ASCII BEL (07) character to PC, but I'm getting no response using Serial.available. What am I missing?

Do I have to run a specific app on the PC to get a response? The docs do not specify that.

Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87
Vaclav
  • 89
  • 2
  • 4

1 Answers1

2

Yes, you'll need something running on the PC which is monitoring the serial port, and which will provide a response in the appropriate format.

The download on this page contains a Processing sketch which will do this for you. After you've unzipped it, look in Time/Examples/Processing/SyncArduinoClock. Open the sketch in Processing, run it, and then start your Arduino.

If you're not familiar with it, Processing is a free programming language / environment based on Java. It's aimed largely at beginners and non-programmers, and is quite commonly used for communicating with Arduino projects via Serial. You can download it here:

Peter Bloomfield
  • 10,982
  • 9
  • 48
  • 87