Evaluation kit ST-C2S (TM2-Q) GPIO AT commands
Select configuration command +NGPIOC
(to select the configuration of the available GPIO,s to either input or output mode)
AT+NGPIOC=<gpio_id>,<gpio_mode>[,<gpio_def>]
Set command: AT+NGPIOC=3,0,1
Possible responses: OK or +CME ERROR: <error>
(0=output, 1=input)
Read command +NGPIOR
(reads the current value of the specified GPIO, no matter whether it is configured as input or output.)
Command syntax: AT+NGPIOR=<gpio_id>
Set command: AT+NGPIOR=4
Possible response: +NGPIOR:<gpio_id>,<gpio_val> OK or +CME ERROR: <error>
Set command +NGPIOW
(sets (“writes”) the output of the specified GPIO, but only if ti is configured in output mode.)
Command syntax: AT+NGPIOW=<gpio_id>,<gpio_val>
Set command: AT+NGPIOW=2,1
Possible response: OK or +CME ERROR: <error>
Sincerely,
George