I am trying to read serial with Python. If I do readline, it always includes the /r/n. To get rid of it, I just do read and I do In_waiting to figure out the number of bytes I have waiting. However, in_waiting always says there are more bytes than are really in there, so I just get garbage after my first few bytes.
Maybe I am thinking about this the wrong way?
python snippet:
numbytes = ser.in_waiting
print(numbytes)
numbytes = numbytes - 4
#result = ser.read_until('\r\n')
#result = ser.readline()
result = ser.read(numbytes)
print(result)