UART Configure Mode.

In this mode, HOST communicates with ESPrtk via UART_0 port to configure (change settings) on ESPrtk.

HOST can also control ESPrtk's hardware features such as controlling IO pins, Bluetooth, WIFI, TCP Task, etc., or controlling other peripheral devices connected to ESPrtk.

Hardware Connect.

Support hardware control .

Use ESPrtk command to start UART configure

 

Use ESPrtk command control

Step 0

ESPrtk after supplying power.

Step 2

HOST send command : $ESP_OK|5|O|_||*441E

Done

ESPrtk will start go to WEB Configure mode.

The CONNECT_LED blink fast.

Success

The CONNECT_LED will light continuously .

ESPrtk respond on TX_UART0: $ESP_OK|5|O|_||*441E


Command Hardware control ESPrtk


Tip : To use these command , ESPrtk need running at UART Configure mode !


<Header> +

<Payload_length>

<Payload>

PL0

PL1

PL2

PL3

PL4

..

$ESP_OK|xx|

‘T’

ID Command

ID Control

Infor 1

Infor 2

...

...



PL0

PL1

Describe Type Command

Numbers of

ID Control

‘T’

‘P'

PL2

Control Enable Type Print on TX_UART0

1

 

‘0’

P_Control Enable Type Print on TX_UART0

 

‘T’

‘G’

PL2

Control GPIO on ESPrtk

3

 

‘0’

G_SET_MODE_GPIO

 

‘1’

G_WRITE_DIGITAL

 

‘2’

G_READ_DIGITAL

 

‘T’

‘U’

PL2

Control UART_1 and UART_2 on ESPrtk

8

 

‘0’

U_Start_UART

 

‘1’

U_Check_UART_Started

 

‘2’

U_Send_String

 

‘3’

U_Send_Binary

 

‘4’

U_Available

 

‘5’

U_Read_String

 

‘6’

U_Read_Binary

 

‘7’

U_Clear_Buffer

 

‘T’

‘I’

PL2

Control WIFI and Ethernet module (ENC28J60) connect to router

4

 

‘0’

I_Start_WIFI_and_Connect_to_Router

 

‘1’

I_WIFI_Disconnect_to_Router

 

‘2’

I_Start_Ethernet_and_Connect_to_Router

 

‘3’

I_Ethernet_Disconnect_to_Router

 

‘T’

‘T’

PL2

Control TCP Client Task communicate with Server

9

 

‘0’

T_Connect_to_Server

 

‘1’

T_Check_Connected_to_Server

 

‘2’

T_Send_String

 

‘3’

T_Send_Binary

 

‘4’

T_Available

 

‘5’

T_Read_String

 

‘6’

T_Read_Binary

 

‘7’

T_Clear_Buffer

 

‘8’

T_Diconnect_to_Server

 

‘T’

‘B’

PL2

Control Bluetooth Classic and Bluetooth BLE on ESPrtk

8

 

‘0’

B_Start_Bluetooth

 

‘1’

B_Check_Client_Connected

 

‘2’

B_Send_String

 

‘3’

B_Send_Binary

 

‘4’

B_Available

 

‘5’

B_Read_String

 

‘6’

B_Read_Binary

 

‘7’

B_Clear_Buffer

 

‘T’

‘O’

PL2

Control OLED Display (SSD1306/SH1106)

12

 

‘0’

O_Start_OLED

 

‘1’

O_Update_and_Display

 

‘2’

O_Clear

 

‘3’

O_Draw_Dot

 

‘4’

O_Draw_Line

 

‘5’

O_Draw_Rect

 

‘6’

O_Draw_Rect_Corner

 

‘7’

O_Draw_Triangle

 

‘8’

O_Draw_Circle

 

‘9’

O_Draw_Elippse

 

‘A’

O_Draw_Character

 

‘B’

O_Draw_Number

 

‘T’

‘S’

PL2

Control SD Card

10

 

‘0’

S_Start_SD_Card

 

‘1’

S_Check_Folder_Exist

 

‘2’

S_Create_Folder

 

‘3’

S_Delete_File

 

‘4’

S_Rename_File

 

‘5’

S_Check_File_Exist

 

‘6’

S_Create_File

 

‘7’

S_Get_Size_File

 

‘8’

S_Read_Binary_data_File

 

‘9’

S_Append_Binary_data_to_File

 

‘T’

‘M’

PL2

Control IMU (MPU9250)

2

 

‘0’

M_Start_Print_IMU_Data

 

‘1’

M_Stop_Print_IMU_Data

 

 

 

Disable/Enable type IMU data

 

 

 

 


XtGem Forum catalog