Home › Forums › Mayfly Data Logger › Setting the real time clock
- This topic has 3 replies, 3 voices, and was last updated 2017-04-24 at 4:43 PM by
Sara Damiano.
-
AuthorPosts
-
-
2017-04-22 at 3:38 PM #2159Anyone out there run the PCsync.ino sketch recently to set up the realAnyone out there run the PCsync.ino sketch recently to set up the real time clock? I loaded it onto a V0.5 board and sent a text string to the device over the Arduino IDE’s serial monitor window containing a current unix time stamp. It spouted back some non-sense. What’s the best DS3231 library to be using right now?
Attachments:
-
2017-04-22 at 4:01 PM #2161Did you try running the PCsync.exe file on your computer with the Mayfly attached? That method worked for me last time I tried it. But I usually just use the adjust.ino sketch available in the ExampDid you try running the PCsync.exe file on your computer with the Mayfly attached? That method worked for me last time I tried it. But I usually just use the adjust.ino sketch available in the Examples folder of the Sodaq_DS3231 library. Or you could use any DS3231 library since there’s nothing unique about the Mayfly’s RTC configuration.
-
2017-04-22 at 9:21 PM #2163Thanks for the response. I had not tried the PCsync.exe yet, I was taking small steps and had only sent a “T149290XXXX” string manually over the Arduino IDE serial monitor before postingThanks for the response. I had not tried the PCsync.exe yet, I was taking small steps and had only sent a “T149290XXXX” string manually over the Arduino IDE serial monitor before posting to the forum.
Since then, I set and read the time successfully using the adjust.ino sketch that was suggested by S. Hicks and then also read the time using the now.ino example code.
After some fiddling, here’s what I’ve concluded: PCSynch.ino is setting and reading the time correctly off the RTC (and so is the helper program PCsynch.exe), but there were some bugs in the serial.print commands in the loop() section of the PCSynch.ino sketch. How do I go about correcting the github code? … think it is called a “pull request” in their parlance, but am otherwise unclear on how to proceed.
It is really tiny stuff: using double quotes for a multi-character string instead of single quotes and removing a – 1 operation from the end of a now.dayOfWeek() call.
-
2017-04-24 at 4:43 PM #2171
I got and accepted your pull request. The fix is in the library now.
-
-
AuthorPosts
- You must be logged in to reply to this topic.