Fixed bit-wise shift in arduino code to account for 32-bit integers and fixed variable data-type binary read-in in Matlab.