Command Write Configure - GPIO_PIN_MAP
<Header> + <Payload_length> | <Payload> | ||||||
PL0 | PL1 | PL2 | PL3 | PL4 | PL5 | … | |
$ESP_OK|xx| | ‘W’ | ‘q’ | Infor 1 | Infor 2 | Infor 3 | Infor 4 | ... |
Name CFG : GPIO_PIN_MAP
Number of field values : 26
Payload Index | Type value | Min Value | Max Value | Default Value | Min Length | Max Length | ID_ESPrtk_Pin map to GPIOx | Unit |
PL2 | INTEGER | 0 | 25 | 18 | - | - | GPIO 0 ← ID_ESPrtk_Pin |
|
PL3 | INTEGER | 0 | 25 | 4 | - | - | GPIO 1 ← ID_ESPrtk_Pin |
|
PL4 | INTEGER | 0 | 25 | 21 | - | - | GPIO 2 ← ID_ESPrtk_Pin |
|
PL5 | INTEGER | 0 | 25 | 1 | - | - | GPIO 3 ← ID_ESPrtk_Pin |
|
PL6 | INTEGER | 0 | 25 | 16 | - | - | GPIO 4 ← ID_ESPrtk_Pin |
|
PL7 | INTEGER | 0 | 25 | 10 | - | - | GPIO 5 ← ID_ESPrtk_Pin |
|
PL8 | INTEGER | 0 | 25 | 14 | - | - | GPIO 12 ← ID_ESPrtk_Pin |
|
PL9 | INTEGER | 0 | 25 | 0 | - | - | GPIO 13 ← ID_ESPrtk_Pin |
|
PL10 | INTEGER | 0 | 25 | 17 | - | - | GPIO 14 ← ID_ESPrtk_Pin |
|
PL11 | INTEGER | 0 | 25 | 11 | - | - | GPIO 15 ← ID_ESPrtk_Pin |
|
PL12 | INTEGER | 0 | 25 | 13 | - | - | GPIO 16 ← ID_ESPrtk_Pin |
|
PL13 | INTEGER | 0 | 25 | 7 | - | - | GPIO 17 ← ID_ESPrtk_Pin |
|
PL14 | INTEGER | 0 | 25 | 8 | - | - | GPIO 18 ← ID_ESPrtk_Pin |
|
PL15 | INTEGER | 0 | 25 | 2 | - | - | GPIO 19 ← ID_ESPrtk_Pin |
|
PL16 | INTEGER | 0 | 25 | 22 | - | - | GPIO 21 ← ID_ESPrtk_Pin |
|
PL17 | INTEGER | 0 | 25 | 19 | - | - | GPIO 22 ← ID_ESPrtk_Pin |
|
PL18 | INTEGER | 0 | 25 | 12 | - | - | GPIO 23 ← ID_ESPrtk_Pin |
|
PL19 | INTEGER | 0 | 25 | 9 | - | - | GPIO 25 ← ID_ESPrtk_Pin |
|
PL20 | INTEGER | 0 | 25 | 23 | - | - | GPIO 26 ← ID_ESPrtk_Pin |
|
PL21 | INTEGER | 0 | 25 | 20 | - | - | GPIO 27 ← ID_ESPrtk_Pin |
|
PL22 | INTEGER | 0 | 25 | 15 | - | - | GPIO 32 ← ID_ESPrtk_Pin |
|
PL23 | INTEGER | 0 | 25 | 3 | - | - | GPIO 33 ← ID_ESPrtk_Pin |
|
PL24 | INTEGER | 0 | 25 | 24 | - | - | GPIO 34 ← ID_ESPrtk_Pin |
|
PL25 | INTEGER | 0 | 25 | 6 | - | - | GPIO 35 ← ID_ESPrtk_Pin |
|
PL26 | INTEGER | 0 | 25 | 25 | - | - | GPIO 36 ← ID_ESPrtk_Pin |
|
PL27 | INTEGER | 0 | 25 | 5 | - | - | GPIO 39 ← ID_ESPrtk_Pin |
|
ID_ESPrtk_Pin | Name pin | ID_ESPrtk_Pin | Name pin |
0 | CWB_Button | 13 | RX_UART2 |
1 | RX_UART0 | 14 | ERROR_LED |
2 | MOSI_SD_Card | 15 | CS_LoRa |
3 | MOSI_LoRa_Ethe | 16 | TX_UART2 |
4 | TX_UART0 | 17 | NEOPIXEL_LED |
5 | MISO_SD_Card | 18 | CS_Ethernet |
6 | MISO_LoRa_Ethe | 19 | SCL_I2C |
7 | RX_UART1 | 20 | SCL_OLED |
8 | SCK_SD_Card | 21 | RST_LoRa_Ethe |
9 | SCK_LoRa_Ethe | 22 | SDA_I2C |
10 | TX_UART1 | 23 | SDA_OLED |
11 | CONNECT_LED | 24 | DI0_LoRa |
12 | CS_SD_Card | 25 | ESPrtk_IO |
Example
ESPrtk Respond
Payload Index
| Type value | Min Value | Max Value | Min Length | Max Length | Describe | Unit | ||
PL2 | ‘q’ | STRING | - | - | 1 | 1 | ID Configure : GPIO_PIN_MAP |
| |
| PL3 | INTEGER | 0 | 1 | - | - | Status Configure |
| |
0 | Error: Failed to save , please try again | ||||||||
1 | OK : Saved configure success | ||||||||
| PL4 | STRING | - | - | - | - | Describe Status Configure in text string format |
|
Command Read configure - GPIO_PIN_MAP
ESPrtk Respond
The index / range of values / data types is similar to the index / range of values / data types of payloads when configured.
Example
Message : | |
HOST Send | $ESP_OK|5|R|q||*772D |
ACK Respond | $ESP_OK|72|R|q|18|4|21|1|16|10|14|0|17|11|13|7|8|2|22|19|12|9|23|20|15|3|24|6|25|5|*3A0B |
NACK Respond | $ESP_ER|… or $ESS_ER|… or $AES_ER|… |