Created
August 29, 2019 10:43
-
-
Save raucao/42ccc72124821997f43ca34dbf12539a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
"""Script to reset time on CardIO via serial, run on HOST computer | |
inspired by: https://badge.team/projects/suckless_flash | |
""" | |
from __future__ import print_function | |
import sys, time | |
dev=open("/dev/ttyACM0", "w") | |
print(chr(0x03), end="", file=dev) | |
cmd = "import utime; utime.set_unix_time({})\r" | |
print(cmd.format(int(time.time())), file=dev) | |
print(chr(0x04), end="", file=dev) | |
dev.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment