So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By atexit8
#67832 https://espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf
is the link to the official Espressif AT command

Throughout, the document, you see
AT+SYSIOSETCFG=12,3,1 //Set GPIO12 to work as a GPIO, but that is wrong.
I get ERROR response from the ESP-01.
The correct command is AT+SYSIOSETCFG=12,0,1

The reason I know this is that when I sent AT+SYSIOGETCFG=0, I received the response +SYSIOGETCFG:0,0,1

I was trying to set the configuration for GPIO2 on my ESP-01 module running v2.1.0 of the official Espressif firmware.

In summation, GPIO2 is not in GPIO mode, and GPIO0 is in GPIO mode.
So, you need to send
Code: Select allAT+SYSIOSETCFG=2,0,1     //set GPIO2 to GPIO mode with internal pullup
AT+SYSGPIODIR=2,1        //set GPIO2 to output mode
AT+SYSGPIOWRITE=2,1      //set GPIO2 to high