I still don't get the right results I suspect the problem might be the way I generate the input file. I used matlab to convert each number to its binary representation. Maybe it's seen as a text file from Arduino?.
I link a sample below.
Just to clarify here there are some of the binary stream I'm getting now
100001001000001
100010001000011
100011001000101
100100001000111
100101001001001
100110001001011
If you look closer you can see that it's actually counting..eliminating the MSB the LSB and the 7th bit we get something like:
0001 0000
0010 0001
0011 0010
etc
Definitely not my input.
-Nick
output.txt (94.3 KB)