OK, so I’m getting closer but I still can’t set the arduino’s clock time and day and date with my Mac. Can anyone help me understand what I’m doing wrong?
On the Uno, I ran the sketch TimeSerialDateStrings|Arduino 1.0.3, with one slight change. I replaced the function “Serial.print(TIME_REQUEST,BYTE);” with “Serial.write(TIME_REQUEST);” based on what I saw in a forum.
On the Mac, I ran the processing sketch SyncArduinoClock|Processing 2.0b7, also with slight mod. I added “import java.util.*;” because GregorianCalendar was not being recognized. At first the processing sketch drew a window on my Mac, but then I got the following error: “Error inside Serial, 0 “
And following is the detailed error message from trying to compile the processing code:
[start of error message]
Experimental: JNI_OnLoad called.
Stable Library
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
[0] "/dev/tty.usbmodemfa141"
[1] "/dev/cu.usbmodemfa141"
[2] "/dev/tty.Bluetooth-PDA-Sync"
[3] "/dev/cu.Bluetooth-PDA-Sync"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"
Connecting to -> /dev/cu.usbmodemfa141
RXTX Warning: Removing stale lock file. /var/lock/LK.008.011.013
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
at processing.serial.Serial.(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at SyncArduinoClock.setup(SyncArduinoClock.java:45)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)
Exception in thread "Animation Thread" java.lang.RuntimeException: Error inside Serial.()
at processing.serial.Serial.errorMessage(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at processing.serial.Serial.(Unknown Source)
at SyncArduinoClock.setup(SyncArduinoClock.java:45)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)
[end of error message]
Thanks again, Bryan