ignore empty inputs from serial (idk why this happens)

This commit is contained in:
Marcus 2023-08-13 04:11:45 +02:00
parent 54509b0c12
commit ea55ec786f

View file

@ -16,7 +16,9 @@ outfile = "epever-tracer.json"
while 1:
# ser.readline()
Data = ser.readline().decode('ascii')
print("Data: ")
print(Data)
if len(Data) > 0:
outFile = open(outfile, "w")
outFile.write(Data)
outFile.close