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()