From ff462a7ce664a8e224c32d1acbb82f9692c5327f Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Tue, 24 May 2022 12:01:37 +0000
Subject: [PATCH] Fixed the accelerometer readout code

---
 python_client/read_accelerometer.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/python_client/read_accelerometer.py b/python_client/read_accelerometer.py
index c8a2f4a..9211b59 100644
--- a/python_client/read_accelerometer.py
+++ b/python_client/read_accelerometer.py
@@ -1,7 +1,8 @@
 #!/usr/bin/python3
 
 #use as: read_accelerometer > output_file.dat
-
-with serial.Serial('/dev/ttyUSB1', 115200, timeout=0) as ser:
-    line = ser.readline()
-    print(line);
+import serial
+with serial.Serial('/dev/ttyUSB0', 115200) as ser:
+    while(True):
+        line = ser.readline()
+        print(line.decode('UTF-8'));

--
Gitblit v1.9.3