Mar-04-2022, 03:30 AM
Would I be right to say that your data are 32 bit integer values transmitted as ASCII characters 0 to 9 and terminated with newline ('\n') and that at the end of the logging session you send a non numeric value ("D") to signal that logging is ended and break from the While loop. That is what I am seeing especially with printf("%d\n",data).
Are you logging just one sensor value or more.
You should be using readline() as deanhystad suggested.
Are you logging just one sensor value or more.
You should be using readline() as deanhystad suggested.