summaryrefslogtreecommitdiff
path: root/t/test.py
diff options
context:
space:
mode:
Diffstat (limited to 't/test.py')
-rwxr-xr-xt/test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/t/test.py b/t/test.py
index c7a1018..e42edbb 100755
--- a/t/test.py
+++ b/t/test.py
@@ -5,9 +5,10 @@ import serial
def main():
with serial.Serial('/dev/ttyACM0', 9600, timeout=10) as ser:
while True:
- b = ser.read()
+ b = ser.readline()
if b:
- print(b)
+ #print(b)
+ print(b.decode('ascii').strip())
if __name__ == '__main__':
main()