From 020bbc42aa4767e8ebd4bade1ec96e0e1238206b Mon Sep 17 00:00:00 2001 From: arismileti Date: Wed, 22 Jan 2020 11:38:20 +0000 Subject: [PATCH] Upload files to '' --- reader.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 reader.py diff --git a/reader.py b/reader.py new file mode 100644 index 0000000..8f1c9d9 --- /dev/null +++ b/reader.py @@ -0,0 +1,17 @@ +import serial + +from time import sleep + +ser = serial.Serial('/dev/ttyACM0', 38400) +sleep(1) + +file = open("dataset", "a") +file.write("[") + +for i in range(1000): + s = ser.readline() + print(s) + file.write(str(s)) + +file.write("]") +file.close()