CyberAtom X-201 User Manual

Request-Response Messages

Table 1. List of I2C request messages.
Message Message ID (hex) Description
GET_SYS_INFO 0x01 Requests sending back information on the device type and firmware version.
GET_QUAT_DATA 0x02 Requests sending back actual orientation in quaternion representation.
GET_EULER_DATA 0x03 Requests sending back actual orientation in Euler angles representation.
GET_ROT_RATE_DATA 0x04 Requests sending back actual rotation rates.
GET_TEMP 0x0F Requests sending current temperature reading
SET_BAUD_RATE 0x10 Requests changing UART interface baud rate. Newly applied baud rate will be used after next power-on or reset of the device. To make sure they persist, WRITE_FLASH command should be used afterwards.
SET_I2C_ADDR 0x11 Requests changing I2C slave address. Newly applied I2C slave address will be after next power-on or reset of the device. To make sure they persist, WRITE_FLASH command should be used afterwards.
GET_RAW_ACC 0x20 Requests sending raw accelerometer measurement data.
GET_RAW_MAG 0x21 Requests sending raw magnetometer measurement data.
GET_RAW_GYR 0x22 Requests sending raw gyroscope measurement data.
GET_NORM_ACC 0x23 Requests sending normalized accelerometer measurement data.
GET_NORM_MAG 0x24 Requests sending normalized magnetometer measurement data.
GET_NORM_GYR 0x25 Requests sending normalized gyroscope measurement data.
GET_CALIB_ACC 0x26 Requests sending calibrated accelerometer measurement data.
GET_CALIB_MAG 0x27 Requests sending calibrated magnetometer measurement data.
GET_CALIB_GYR 0x28 Requests sending calibrated gyroscope measurement data.
GET_I2C_ADDR 0x30 Requests currently set I2C address.
GET_BAUD_RATE 0x31 Requests currently set baud rate.

GET_SYS_INFO

Message ID: 0x01

Description: Requests sending back information on the device type and firmware version.

Request Data Bytes: 0

Response data Bytes: 32

Table 2. Structure of response data bytes for GET_SYS_INFO message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 null-terminated string (varies) Device type identifier.
8 null-terminated string (varies) Firmware release version in MAJOR.MINOR.PATCH format, optionally extended with other symbols.

GET_QUAT_DATA

Message ID: 0x02

Description: Requests sending back actual orientation in quaternion representation.

Request Data Bytes: 0

Response data Bytes: 16

Table 3. Structure of response data bytes for GET_QUAT_DATA message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) q0 component
4 IEEE754 float (varies) q1 component
8 IEEE754 float (varies) q2 component
12 IEEE754 float (varies) q3 component

GET_EULER_DATA

Message ID: 0x03

Description: Requests sending back actual orientation in Euler angles representation.

Request Data Bytes: 0

Response data Bytes: 12

Table 4. Structure of response data bytes for GET_EULER_DATA message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) Pitch angle in degrees.
4 IEEE754 float (varies) Roll angle in degrees.
8 IEEE754 float (varies) Yaw angle in degrees.

GET_ROT_RATE_DATA

Message ID: 0x04

Description: Requests sending back actual rotation rates.

Request Data Bytes: 0

Response data Bytes: 12

Table 5. Structure of response data bytes for GET_ROT_RATE_DATA message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) Rotation rate over X axis in degrees/second.
4 IEEE754 float (varies) Rotation rate over Y axis in degrees/second.
8 IEEE754 float (varies) Rotation rate over Z axis in degrees/second.

GET_TEMP

Message ID: 0x0F

Description: Requests sending current temperature reading

Request Data Bytes: 0

Response data Bytes: 4

Table 6. Structure of response data bytes for GET_TEMP message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) Actual temperature value in Celsius degrees.

SET_BAUD_RATE

Message ID: 0x10

Description: Requests changing UART interface baud rate. Newly applied baud rate will be used after next power-on or reset of the device. To make sure they persist, WRITE_FLASH command should be used afterwards.

Request Data Bytes: 1

Table 7. Structure of request data bytes for SET_BAUD_RATE message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) New baud rate.

Response data Bytes: 1

Table 8. Structure of response data bytes for SET_BAUD_RATE message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) Current baud rate.

SET_I2C_ADDR

Message ID: 0x11

Description: Requests changing I2C slave address. Newly applied I2C slave address will be after next power-on or reset of the device. To make sure they persist, WRITE_FLASH command should be used afterwards.

Request Data Bytes: 1

Table 9. Structure of request data bytes for SET_I2C_ADDR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) New 7-bit I2C slave address for the device.

Response data Bytes: 1

Table 10. Structure of response data bytes for SET_I2C_ADDR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) 7-bit I2C slave device address.

GET_RAW_ACC

Message ID: 0x20

Description: Requests sending raw accelerometer measurement data.

Request Data Bytes: 0

Response data Bytes: 6

Table 11. Structure of response data bytes for GET_RAW_ACC message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 16-bit signed, two's complement (varies) x component of acclerometer measurement
2 16-bit signed, two's complement (varies) y component of acclerometer measurement
4 16-bit signed, two's complement (varies) z component of acclerometer measurement

GET_RAW_MAG

Message ID: 0x21

Description: Requests sending raw magnetometer measurement data.

Request Data Bytes: 0

Response data Bytes: 6

Table 12. Structure of response data bytes for GET_RAW_MAG message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 16-bit signed, two's complement (varies) x component of magnetometer measurement
2 16-bit signed, two's complement (varies) y component of magnetometer measurement
4 16-bit signed, two's complement (varies) z component of magnetometer measurement

GET_RAW_GYR

Message ID: 0x22

Description: Requests sending raw gyroscope measurement data.

Request Data Bytes: 0

Response data Bytes: 6

Table 13. Structure of response data bytes for GET_RAW_GYR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 16-bit signed, two's complement (varies) x component of gyroscope measurement
2 16-bit signed, two's complement (varies) y component of gyroscope measurement
4 16-bit signed, two's complement (varies) z component of gyroscope measurement

GET_NORM_ACC

Message ID: 0x23

Description: Requests sending normalized accelerometer measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 14. Structure of response data bytes for GET_NORM_ACC message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of acclerometer measurement
4 IEEE754 float (varies) y component of acclerometer measurement
8 IEEE754 float (varies) z component of acclerometer measurement

GET_NORM_MAG

Message ID: 0x24

Description: Requests sending normalized magnetometer measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 15. Structure of response data bytes for GET_NORM_MAG message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of magnetometer measurement
4 IEEE754 float (varies) y component of magnetometer measurement
8 IEEE754 float (varies) z component of magnetometer measurement

GET_NORM_GYR

Message ID: 0x25

Description: Requests sending normalized gyroscope measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 16. Structure of response data bytes for GET_NORM_GYR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of gyroscope measurement
4 IEEE754 float (varies) y component of gyroscope measurement
8 IEEE754 float (varies) z component of gyroscope measurement

GET_CALIB_ACC

Message ID: 0x26

Description: Requests sending calibrated accelerometer measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 17. Structure of response data bytes for GET_CALIB_ACC message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of acclerometer measurement
4 IEEE754 float (varies) y component of acclerometer measurement
8 IEEE754 float (varies) z component of acclerometer measurement

GET_CALIB_MAG

Message ID: 0x27

Description: Requests sending calibrated magnetometer measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 18. Structure of response data bytes for GET_CALIB_MAG message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of magnetometer measurement
4 IEEE754 float (varies) y component of magnetometer measurement
8 IEEE754 float (varies) z component of magnetometer measurement

GET_CALIB_GYR

Message ID: 0x28

Description: Requests sending calibrated gyroscope measurement data.

Request Data Bytes: 0

Response data Bytes: 12

Table 19. Structure of response data bytes for GET_CALIB_GYR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 IEEE754 float (varies) x component of gyroscope measurement
4 IEEE754 float (varies) y component of gyroscope measurement
8 IEEE754 float (varies) z component of gyroscope measurement

GET_I2C_ADDR

Message ID: 0x30

Description: Requests currently set I2C address.

Request Data Bytes: 0

Response data Bytes: 1

Table 20. Structure of response data bytes for GET_I2C_ADDR message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) 7-bit I2C slave device address.

GET_BAUD_RATE

Message ID: 0x31

Description: Requests currently set baud rate.

Request Data Bytes: 0

Response data Bytes: 1

Table 21. Structure of response data bytes for GET_BAUD_RATE message on I2C interface.
Byte Offset Data Type Value (hex) Descripion
0 8-bit unsigned (varies) Current baud rate.