WT61 Communication protocol

WT61 Communication protocol

WT61 Communication protocol

Instructions for use:

Enter commands that need to modify settings or read data

Read Format

  • Data is sent in hexadecimal, not ASCII.

  • Each data is transmitted in sequence by low byte and high byte, and the two are combined into a signed short type of data. For example, for data DATA1, DATA1L is the low byte and DATA1H is the high byte. The conversion method is as follows:

suppose DATA1 is the actual data, DATA1H is its high-byte part, DATA1L is its low-byte part

Then: DATA1=(short)((short)DATA1H<<8|DATA1L). It must be noted here that DATA1H needs to be coerced into a signed short type of data before shifting, and the data type of DATA1 ise also a signed short type, so that negative numbers can be represented.

Protocol header

Data content

Data lower 8 bits

Data higher 8 bits

Data lower 8 bits

Data higher 8 bits

Data lower 8 bits

Data higher 8 bits

Data lower 8 bits

Data higher 8 bits

SUMCRC

0x55

TYPE【1】

DATA1L[7:0]

DATA1H[15:8]

DATA2L[7:0]

DATA2H[15:8]

DATA3L[7:0]

DATA3H[15:8]

DATA4L[7:0]

DATA4H[15:8]

SUMCRC【2】

【1】TYPE(Data content):

TYPE

Remark

0x51

Acceleration

0x52

Angular velocity

0x53

Angle

【2】SUMCRC (Data and Checksum):

SUMCRC=0x55+TYPE+DATA1L+DATA1H+DATA2L+DATA2H+DATA3L+DATA3H+DATA4L+DATA4H

SUMCRC is a char type, taking the lower 8 bits of the checksum

Acceleration output

0x55

0x51

AxL

AxH

AyL

AyH

AzL

AzH

TL

TH

SUM

Name

Description

Remark

AxL

Acceleration X low 8 bits

Acceleration X=((AxH<<8)|AxL)/32768*16g

(g is the acceleration of gravity, preferably 9.8m/s2)

AxH

Acceleration X high 8 bits

AyL

Acceleration Y low 8 bits

Acceleration Y=((AyH<<8)|AyL)/32768*16g

(g is the acceleration of gravity, preferably 9.8m/s2))

AyH

Acceleration Y high 8 bits

AzL

Acceleration Z low 8 bits

Acceleration Z=((AyH<<8)|AyL)/32768*16g

(g is the acceleration of gravity, preferably 9.8m/s2)

AzH

Acceleration Z high 8 bits

TL

8-bit lower temperature

Temperature calculation formula:

temperature=((TH<<8)|TL) / 32768 * 96.38 + 36.53

TH

8-bit high temperature

SUM

Checksum

SUM=0x55+0x51+AxL+AxH+AyL+AyH+AzL+AzH+TL+Th

Angular velocity output

0x55

0x52

WxL

WxH

WyL

WyH

WzL

WzH

VolL

VolH

SUM

Name

Description

Remark

WxL

Angular velocity X low 8 bits

Angular velocity X=((WxH<<8)|WxL)/32768*2000°/s

WxH

Angular velocity X high 8 bits

WyL

Angular velocity Y low 8 bits

Angular velocity Y=((WyH<<8)|WyL)/32768*2000°/s

WyH

Angular velocity Y high 8 bits

WzL

Angular velocity Z low 8 bits

Angular velocity Z=((WzH<<8)|WzL)/32768*2000°/s

WzH

Angular velocity Z high 8 bits

VolL

Voltage lower 8 bits

(For non-Bluetooth products, this data is invalid)

Voltage calculation formula:

Voltage=((VolH<<8)|VolL) /100 ℃

VolH

Voltage high 8 bits

SUM

Check sum

SUM=0x55+0x52+WxL+WxH+WyL+WyH+WzL+WzH+VolH+VolL

Angle output

0x55

0x53

RollL

RollH

PitchL

PitchH

YawL

YawH

VL

VH

SUM

Name

Description

Remarks

RollL

Roll angle X lower 8 bits

Roll angle X=((RollH<<8)|RollL)/32768*180(°)

RollH

Roll angle X high 8 bits

PitchL

Pitch angle Y low 8 bits

Pitch angle Y=((PitchH<<8)|PitchL)/32768*180(°)

PitchH

Pitch angle Y high 8 bits

YawL

Yaw angle Z low 8 bits

Yaw angle Z=((YawH<<8)|YawL)/32768*180(°)

YawH

Yaw angle Z high 8 bits

VL

The lower 8 bits of the version number

Version number calculation formula: (Note: no version number data)

VH

Version number high 8 bits

SUM

checksum

SUM=0x55+0x53+RollH+RollL+PitchH+PitchL+YawH+YawL+VH+VL

Write format

  • The following data, all use Hex code hexadecimal

protocol header

protocol header

command

0xFF 0xAA CMD

0xFF 0xAA CMD

0xFF 0xAA CMD

  • The Data is sent in hexadecimal, not ASCII.

Z-axis angle to zero

Instruction

0xFF

0xAA

0x52

Remark

Z axis angle to zero

Example

FF AA 52(Z axis angle to zero)

Addition calibration

Instruction

0xFF

0xAA

0x67

Remark

Acceleration calibration

Example

FF AA 67(Acceleration calibration)

Sleep and Unsleep

Instruction

0xFF

0xAA

0x60

Remark

Switch sleep mode and work mode

Example

Currently in working mode, send FF AA 60 to enter sleep mode, currently in sleep mode, send FF AA 60 to enter working mode

Serial port mode

Instruction

0xFF

0xAA

0x61

Remark

Use serial port, disable IIC

Example

FF AA 61(Use serial port)

IIC Mode

Instruction

0xFF

0xAA

0x62

Remark

Using IIC, disable serial port

Example

FF AA 62(IIC mode)

Baud rate115200

Instruction

0xFF

0xAA

0x63

Remark

The serial port baud rate is 115200, and the return rate is 100Hz

Example

FF AA 63(Baud rate为115200,return rate为100Hz)

Baud rate9600

Instruction

0xFF

0xAA

0x64

Remark

The serial port baud rate is 9600, and the return rate is 20Hz

Example

FF AA 64(Baud rate is 9600,return rate is 20Hz)

Horizontal installation

Instruction

0xFF

0xAA

0x65

Remark

Modules are placed horizontally

Example

FF AA 65(Horizontal installation)

Vertical installation

Instruction

0xFF

0xAA

0x66

Remark

Modules are placed vertically

Example

FF AA 66(vertical installation)

Last updated