Read unit8 bytes to data

I want to convert the unit8 bytes array into meaningful data. For example, if I connect to the metawear motion r board, and read the gyroscope and accelerometer, I see this:

// gyroscope
[19, 5, 165, 0, 70, 0, 99, 0]

// accelerometer
[3, 4, 63, 0, 174, 254, 252, 222]

From looking at the tutorials around the net, I can tell that the pairs represent axis. In the gyroscope example, here is what I think is correct:

[165 0] - x axis gyro raw
[70 0] - y axis gyro raw
[99 0] - z axis gyro raw

How can I convert the unit8 bytes into a float representation of the sensor values ( both for accelerometer and gyroscope streams ) ? ( A Swift or Java code example would help substantially here )

Comments

Sign In or Register to comment.