aboutsummaryrefslogtreecommitdiffstats
path: root/reinit.py
diff options
context:
space:
mode:
authorvg <vgm+dev@devys.org>2020-07-07 16:24:01 +0200
committervg <vgm+dev@devys.org>2020-07-07 16:24:01 +0200
commit66dcf910bd4744d8ced56cb9586aa937a1a2d4c5 (patch)
treedf4dca1ae4af1e5df0be0d1f4f2cd0d54751f8e8 /reinit.py
downloadhic-master.tar.gz
hic-master.tar.bz2
hic-master.zip
first commitHEADmaster
Diffstat (limited to 'reinit.py')
-rwxr-xr-xreinit.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/reinit.py b/reinit.py
new file mode 100755
index 0000000..76e5828
--- /dev/null
+++ b/reinit.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import os
+import sys
+import serial
+import base64
+from time import sleep
+
+if len(sys.argv) < 2:
+ print "firt argument is device."
+ raise SystemExit
+
+ser = serial.Serial(sys.argv[1], 38400, timeout=0.5, rtscts=0)
+count = 8*8
+for i in range(count):
+ ser.write('\0')
+ #sleep(0.1)
+