Mar-04-2022, 02:58 PM
I believe the data is terminated with newline due to the example he gave (For ex: printf("%d\n",data). The code he posted is receiving and decoding ASCII codes ? and printing them to file. Originally he left the newline untouched which formatted his csv file into columns, when he removed that format the data got placed on the spreadsheet in continuous rows, the fact that the column data got separated makes me think that those values each equate to the value of one 32 bit integer printf("%d\n",data). The purposed of the 'D' character is to break out of the while loop when he has finished his logging session not for separating samples. I also believe there may be a certain lack of understanding about the difference of reading bytes or bytes encoded as ASCII characters. Until he responds we wont know for certain, it would be nice to see what is being sent and compare to what is received, the 17 or so values that we see range from 77 to 85 it would be nice to know if that was expected.