I'm basically sending a bunch of sensor data from an Arduino across an XBee and parsing it in Max. It's 9 sensors (3-axis accel/gyro/magnetometer) and I'm sending each stream as two 8-bit Bytes using the following code format:
I was actually just sending single bytes before but the data kept jumping from 0-250 or so, but it makes sense now as it was just getting truncated.
So how do I combine those two bytes into a single int in Max?
I found this code that does it backwards (16bit int to two 8-bit bytes), but I can't figure out how to do it the other way around.
Also not sure if it matters but 6 of the sensors are 10-bit (being read by the Arduinos ADCs) and 3 are 16-bit (coming in over the i2c bus). I'm guessing combining the bytes into an int which make the 10-bit numbers 0-1023 and the 16-bit ones 0-60000 or whatever it is.