Skip to content
Snippets Groups Projects
Commit c41b20f5 authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

wip

parent 50f6f3d8
Branches
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
# warranty is provided, and users accept all liability. # warranty is provided, and users accept all liability.
# #
char_delay = 0.0001
import sys,serial,time import sys,serial,time
if (len(sys.argv) < 3): if (len(sys.argv) < 3):
print("upy.py port command [arguments]") print("upy.py port command [arguments]")
...@@ -31,7 +32,7 @@ if (sys.argv[2] == 'run'): ...@@ -31,7 +32,7 @@ if (sys.argv[2] == 'run'):
file.close() file.close()
for i in str: for i in str:
s.write(bytes(i,'ascii')) s.write(bytes(i,'ascii'))
time.sleep(0.001) time.sleep(char_delay)
s.write(b'\x04') # ^d exit raw mode and execute s.write(b'\x04') # ^d exit raw mode and execute
while (True): # show output while (True): # show output
sys.stdout.write(s.read().decode('utf-8')) sys.stdout.write(s.read().decode('utf-8'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment