Skip to content

Commit

Permalink
Enhanced rate tester
Browse files Browse the repository at this point in the history
  • Loading branch information
aivarannamaa committed Sep 22, 2020
1 parent 5f831f2 commit 741604a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions misc/mmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,29 @@

import serial

count = 370
code = """
s = %r
print()
print(len(s), set(s))
""" % ("*" * 1850)
""" % ("*" * count)

#s = serial.Serial("/dev/ttyUSB0", 115200)
s = serial.Serial("/dev/ttyACM0", 115200)
s = serial.Serial("COM4", 115200)

s.write(b"\x03")
time.sleep(0.2)
s.write(b"\x03")
s.write(b"\x01")

print(s.read_until(b">"))
s.write(code.encode())
s.flush()
time.sleep(0.1)
s.write(b"\x04")
print(s.read_until(b"exit\r\n>"))
print("here we go")

for i in range(10):
s.write(code.encode("UTF-8"))
s.flush()
s.write(b"\x04")
print(s.read_until(b"OK"))

while True:
print(s.read(1).decode(), end="")
Expand Down

0 comments on commit 741604a

Please sign in to comment.