![WiT WT901BLECL 5.0 Скачать руководство пользователя страница 19](http://html1.mh-extra.com/html/wit/wt901blecl-5-0/wt901blecl-5-0_manual_989787019.webp)
https://wiki.wit-motion.com/english
Wh86 13652339539 E-mail:[email protected] Web:https://wiki.wit-motion.com/english
- 19 -
Explanation:
When the port mode is set to analog input, the port status data represents the analog voltage.
The actual voltage is calculated according to the following formula:
U=DxStatus/1024*U
vcc
U
vcc
is chip supply voltage, there is LDO in it, If the module supply voltage > 3.5V, U
vcc
is
3.3V.
If the module supply voltage <3.5V, U
vcc
=voltage-0.2V.
When the port mode is set to digital input, the port status data indicates the digital level
status of the port, with a high level of 1 and a low level of 0.
The port status data is 1 when the port mode is set to high output mode.
The port status data bit is 0 when the port mode is set to low output mode.
3 Quaternion output
0x55 0x71 0x51 0x00 Q0L Q0H Q1L Q1H Q2L Q2H Q3L Q3H
.
.....
Calculated formular
:
Q0=((Q0H<<8)|Q0L)/32768
Q1=((Q1H<<8)|Q1L)/32768
Q2=((Q2H<<8)|Q2L)/32768
Q3=((Q3H<<8)|Q3L)/32768
Checksum
:
Sum=0x55+0x59+Q0L+Q0H+Q1L +Q1H +Q2L+Q2H+Q3L+Q3H
3. Temperature output
0x55
0x71
0x40
0x00
TL
TH
......
Calculated formular
:
T=((TH<<8)|TL) /100
℃
6.2 APP to Module
Send instruction:
6.2.1
Read register value
FF AA 27 XX 00
Read register value
--XX is register.
EX: 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