Skip to content

Instantly share code, notes, and snippets.

@quiffman
Created July 31, 2017 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quiffman/70ccb1b5197e18c0e9fdd813bfd400de to your computer and use it in GitHub Desktop.
Save quiffman/70ccb1b5197e18c0e9fdd813bfd400de to your computer and use it in GitHub Desktop.
Arduino RTC Clock Sync with Linux
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