Data Sheet

Copyright © Terabee 2018
Quaternion
and
Linear
acceleration
Data output:
IM\t www\txxx\tyyy\tzzz\txxx\tyyy\tzzz\r\n
- Header (two characters): I (73 decimal / 0x49 hex) and
M (77 decimal / 0x4D hex)
- Tabulation: \t (9 decimal / 0x09 hex)
- Orientation data in quaternion format.You need to divide
those four values by 2^14.
- Linear acceleration. Those value are expressed in mg.
- Carriage return character: \r (13 decimal / 0x0D hex)
- New line character: \n (10 decimal / 0x0A hex)
5.7 Command validation
For each command sent, a response is generated to inform the user whether the command
has been validated. It is important to receive a response value before proceeding with the
next command. Sending commands too early may discard the one still processing.
Response commands consist of four bytes and are a hexadecimal value. They contain (in
order):
- a header (0x30)
- the CMD code which corresponds to the first four most significant bits of the second
byte of the send command (for example for the command 0x00110145 it will be 0x01)
- an ACK (0x00) or a NACK (0xFF)
- a CRC-8 checksum of the message contents
Example:
Hex Command: 00 11 01 45
Hex Answer: 30 01 00 F4
To calculate the CRC-8 checksum byte, we advise you to use an online CRC-8 calculator.
Here is one: http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
The following table sums-up the expected responses to all the commands described in the
document.
Terabee Website:
90 Rue Henri Fabre Technical support:
01630, Saint-Genis-Pouilly Commercial:
www.teraranger.com
support@teraranger.com
teraranger@terabee.com
26/27