
https://wiki.wit-motion.com/english
Wh86 13652339539 E-mail:[email protected] Web:https://wiki.wit-motion.com/english
- 18 -
FF AA 27 XX 00
--XX is register number. The register number please refer to 7.3. Example as below:
Function
Instruction
Read magnetic field
FF AA 27 3A 00
Read port status
FF AA 27 41 00
Read quaternion
FF AA 27 51 00
Read temperature
FF AA 27 40 00
After send instruction, the module turn back a data packet 0x55 0x71. There are register
address and 7 registers data (Fixed upload 8 registers). Return data format as below:
Start register(2 byte) + register data(16 byte, 8 registers)
Note: 0xNN is a accurate value, low byte first, high byte last.
1. Magnetic field output
0x71
0x3A
0x00
HxL
HxH
HyL
HyH
HzL
HzH
..
....
Calculated formular
:
Unit: mG
Magnetic field
(
x axis
)
Hx=(( HxH<<8)| HxL)
Magnetic field
(
y axis
)
Hy=(( HyH <<8)| HyL)
Magnetic field
(
z axis
)
Hz =(( HzH<<8)| HzL)
EX: Send instruction to read magnetic field in APP: FF AA 27 3A 00 (Please refer
to 7.2.8) The module return data to APP: 55 71 3A 00 68 01 69 00 7A 00 00 00 00 00 00 00 00
00 00 00 Total: 20 bytes.
Calculate the no.5 to no.10 bytes as described above, magnetic field x=360
,
y=105,z=122
2. Port status data output
0x55 0x71 0x41 0x00 D0L D0H D1L D1H D2L D2H D3L D3H
.
.....
Calculated formular
:
D0 = (D0H<<8)| D0L
D1 = (D1H<<8)| D1L
D2 = (D2H<<8)| D2L
D3 = (D3H<<8)| D3L
Packet
header
Sign
Start
register
low
byte
Start
register
high
byte
Start(No.1)
register
data low
byte
Start(No.1)
register
data high
byte
.
....
.
No.8
register
data low
byte
No.8
register
data high
byte
0x55
0x71 RegL
RegH
0xNN
0xNN
.
....
.
0xNN
0xNN