Chengdu Ebyte Electronic Technology Co., Ltd.
E103-W01 User Manual
Copyright ©2012–2018
Chengdu Ebyte Electronic Technology Co., Ltd.
23
8 AT command
1
AT+SYSIOSETCFG- set IO working mode
AT+SYSIOSETCFG=<pin>,<mode>,<pull-up>
Response
:
OK
• <pin>
:
IO
pin No.
• <mode>
:
IO
working day
• <pull-up>
‣ 0
:
Disenable
‣ 1
: Enable
AT+SYSIOSETCFG=12,3,1 //set GPIO12 working at GPIO mode
Note
:
E103-W02 has GPIO4\GPIO5\GPIO12\GPIO13\GPIO14 available for user.
2
AT+SYSIOGETCFG-inquiry IO working mode
AT+SYSIOGETCFG=<pin>
Response
:
+SYSIOGETCFG:<pin>, <mode>, <pull-up>
OK
• <pin>
:
IO
pin No.
• <mode>
:
IO
working day
• <pull-up>
‣ 0
:
Disenable
‣ 1
: Enable
For example
:
AT+SYSIOGETCFG=4
3
AT+SYSGPIODIR-set GPIO working as input and output
AT+SYSGPIODIR=<pin>,<dir>
Response
:
• When succeed
,
return
OK
• if IO
pins are not in GPIO mode
,
it reminds
NOT GPIO MODE
!
ERROR
• <pin>
:
GPIO
No.
• <dir>
:
‣ 0
:
set GPIO as input
‣ 1
:
set GPIO as output
For example
:
AT+SYSIOSETCFG=12,3,1 //set GPIO12 working at GPIO mode
AT+SYSGPIODIR=12,0 //set GPIO12 as input
4
AT+SYSGPIOWRITE-set GPIO output level
AT+SYSGPIOWRITE=<pin>, <level>
Response
:
• When succeed
,
return
OK
• if IO
pins are not in output mode
,
it reminds
NOT OUTPUT
!
ERROR
• <pin>
:
GPIO No.
• <level>
:
‣ 0
:
low level
‣ 1
:
high level
For example
:
AT+SYSIOSETCFG=12,3,1 //set GPIO12 working at GPIO mode
AT+SYSGPIODIR=12,1 //set GPIO12 as output
AT+SYSGPIOWRITE=12,1 //set GPIO12 outputting high level
5
AT+SYSGPIOREAD- read GPIO communication level