Source

alphaclock / set-time

Full commit
1
2
3
4
5
#!/bin/sh
# Expects unix epoch time in decimal
# Arduino serial monitor should be in 19200 mode
DEV="/dev/tty.usbserial-FTE531WL"
exec > $DEV perl -e 'printf "%sST%010d", chr(0xff), scalar(time()) - 60*60*5'