I converted the input files in binary unsigned 2 bytes. Then I wrote a simple program just to check if the binary numbers are correctly read from Arduino shown below.
I have some problem: in the serial I don't get what I expect to see, for example:
What I have in the SD: 0000010110110100 -> (1460)dec what I see in the serial: 11000000110000 -> (12336)dec
What I'm missing? Am I reading the buffer in the wrong way?
const int S = 512;
short buffer[S];
int i;
myFile.read(buffer,sizeof(buffer));
while(myFile.available()!=0)
for(i=0;i<S;i++)
Serial.print(buffer[i],BIN);