Command Hardware Control – IMU (MPU9250)

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘M’

ID Control

Infor 1

Infor 2

Infor 3

...

 

 

‘T’

‘M’

PL2

Control IMU (MPU9250)

2

 

‘0’

M_Start_Print_IMU_Data

 

‘1’

M_Stop_Print_IMU_Data

 

 

 

Disable/Enable type print IMU

 

 

 

 

HOST send M_Start_Print_IMU_Data

 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘M’

‘0’

Infor 1

Infor 2

Infor 3

...

 

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

 

ID Control :M_Start_Print_IMU_Data

 

 

PL3

INTEGER

0

9

-

-

Type frequency update IMU

 

 

0

2 Hz

1

10 Hz

2

15 Hz

3

20 Hz

4

25 Hz

5

35 Hz

6

50 Hz

7

100 Hz

8

150 Hz

9

200 Hz

 

ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘0’

 

ID Control : M_Start_Print_IMU_Data

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error: Not found data configure for MPU9250 in Profile

1

OK: Is starting connect to IMU and print IMU data

 

PL4

STRING

-

-

-

-

Describe status respond control as text

 

 

Example

 

Message :

HOST Send

$ESP_OK|8|T|M|0|1|*3D5A

ACK Respond

$ESP_OK|64|T|M|0|1|Is starting print IMU data , Type Frequency update = 1 |*1C0E

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 

 

 

HOST send M_Stop_Print_IMU_Data


 

<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

PL5

$ESP_OK|xx|

‘T’

‘M’

‘1’

Infor 1

Infor 2

Infor 3

...



 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

STRING

-

-

1

1

ID Control : M_Stop_Print_IMU_Data

 


ESPrtk Respond

 

Payload

Index

 

Type value

Min

Value

Max

Value

Min Length

Max Length

Describe

Unit

PL2

‘1’

 

ID Control : M_Stop_Print_IMU_Data

 

 

PL3

INTEGER

-1

1

-

-

Status Control

 

-1

NACK: Invalid input /wrong format / out of range …?

0

Error:

1

OK: Stopped Print IMU data

 

PL4

STRING

-

-

-

-

Describe status respond control as text

 


Example

 

Message :

HOST Send

$ESP_OK|6|T|M|1|*7F26

ACK Respond

$ESP_OK|31|T|M|1|1|Stopped Print IMU data|*031B

NACK Respond

 

Other NACK

$ESP_ER|… or $ESS_ER|… or $AES_ER|…

 


HOST send Disable/Enable type print IMU


Please see “Control Enable Type Print on TX_UART0” → PL3 → BIT11 and BIT12.

 

$ESP_OK|19|T|P|0|000000000000|*2157 -> Disable Print ALL output UART_0

$ESP_OK|19|T|P|0|111111111100|*2156 -> Disable Print IMU 1 + IMU2

$ESP_OK|19|T|P|0|111111111110|*2057 -> Disable Print IMU 1 , Enable Print IMU2

$ESP_OK|19|T|P|0|111111111101|*2056 -> Enable Print IMU1 , Disable Print IMU 2

$ESP_OK|19|T|P|0|111111111111|*2157 -> Enable Print ALL output UART_0