Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By derpunkt
#23473 Hi,

i successfully use the ESP-201 to switch a 2-channel-relay board via wifi and even work as a client to update some webdata at the same time.

Now i wanted to switch more relays.

I found pictures shown that there are GPIO07 - GPIO10 available on the Pins D0 - D3 (for example).

I work with the Arduino IDE - but i don't get it to work that i can use these Dx-Pins to work as GPIOs (Output).

I tried with the pinMode-command - but no success.
Even the GPIO0 i do not get to work successfully.

Do you have any hints how i can get these Pins to work as GPIO?

thanks in advance...
User avatar
By martinayotte
#23512 You need to switch the function of the pin to make it as a GPIO.
If I'm not doing mistake, taken from defines in eagle_soc.h, it should look something like :
Code: Select allPIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U, FUNC_GPIO1);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0RXD_U, FUNC_GPIO3);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0);
User avatar
By Duane J
#23536 Oh wow, this is excellent info. Thanks martinayotte. So to answer OP's question, enabling GPIOs 7 thru 10 should be possible with this, right?

Code: Select allPIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA0_U, FUNC_GPIO7);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA1_U, FUNC_GPIO8);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA2_U, FUNC_GPIO9);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_SD_DATA3_U, FUNC_GPIO10);