Created
July 31, 2017 09:20
-
-
Save quiffman/70ccb1b5197e18c0e9fdd813bfd400de to your computer and use it in GitHub Desktop.
Arduino RTC Clock Sync with Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To sync an arduino RTC clock over USB tty, without the need for installing the DateTime or Time example processing sketch. | |
Useful for EvilMadScience Bulbdial Clock. | |
``` | |
$ stty -F /dev/ttyUSB0 raw speed 9600 | |
9600 | |
$ printf '%c%d' $'\xFF' $(date +%s) > /dev/ttyUSB0 | |
``` | |
To follow the change, in a separate terminal run something like: | |
``` | |
$ cat /dev/ttyUSB0 | |
Clock synced at: | |
1501492213 | |
9:10:13 Monday July 31 | |
^C | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment