ESP-01S - Beginner

I'm new to ESP-01S (Black PCB). & going to blink my own LED. I got below questions.

  1. According to the schematic GPIO0 & GPIO2 are both occupied. (GPIO2 is connected to a Blue LED & GPIO0 is pulled up). How can I make these 2 pins as general I/O pins?

2.To make the ESP01 into programing mode GPIO0 should be GND.After programing it should release from GND & do a RESET. Looks likes lots of work with two buttons.!! Do I need to do this everytime? Is there any easy way of programing from Arduino IDE?

Two buttons? The ESP-01 has no buttons.

How are you flashing it?

This is what I use:

GPIO ports:
The ESP8266-01 has four GPIO pins.
GPIO0 must be high on boot, otherwise the ESP will go into the flash mode.
GPIO2 is a general-purpose GPIO port.
GPIO1 is the RX pin and must be high on boot.
GPIO3 is the Tx pin, and is general-purpose.

To use TX/RX for GPIO, add this to your code at the beginning of void setup():

pinMode(1, FUNCTION_3);   //Use Tx as GPIO1
pinMode(3, FUNCTION_3);   //Use Rx as GPIO3

You will no longer be able to use the Serial Monitor as TX will now be a GPIO pin and not transmit Serial data. You can still Flash your device as when you boot the device in flash mode it converts GPIO1 and GPIO3 back to TX/RX. Once you reboot into regular running mode GPIO1 and GPIO3 will go back to being GPIO pins.

To change GPIO1 and GPIO3 back to being TX/RX for regular Serial Monitor use, add this to your code at the beginning of void setup():

pinMode(1, FUNCTION_0);   //Use GPIO1 as Tx
pinMode(3, FUNCTION_0);   //Use GPIO3 as Rx

OK thanks for the reply.

I got what you mean.ESP01 does not have buttons. I just hooked 2 buttons one for Reset & other one to GP0 (flash).

I'm doing a big code on on ESP01 using arduino IDE. So it has many try outs, In developing stage it has to re program millions of times...:slight_smile:

To reprogram the ESP every time I have to press GP0 button to flash mode, then upload sketch, then again press the reset button (for normal run to test the program).

If I buy your ESP 01 adapter will it be easy to re program? Do I still have to press buttons?

Actually I want hands free program operation (just write the code on IDE then click upload sketch. Then the code will be upload & run the program...

Can it be done?


It is basically OK but this is what I use:

Programs and then starts uploaded code to run completely automatically.

I very much doubt that, even if the Flash were rated for it. :grin:

So get the module I linked.

Connect to them. They are general I/O pins. Just note that you must not have them pulled down, specifically on power up. You can connect a button to ground as long as you know it will not be pressed when you power up.

But do remember that the ESP-01(S) actually has four GPIO pins available in your target design. :+1:


Very Nice.Can you share the link of your adapter?

Look harder! :sunglasses:

The IDE, I think, toggles the RTS pin on the UART which is wired to the reset pin. I am unaware of any ESP programming jigs that do this.

If you have the RAM available, you could run Arduino OTA on the ESP, then you would almost have a hands-free operation, but you would still have to manually put it into the flash mode.

The module I cited clearly does exactly that. Same circuit as the WeMOS D1 Mini.

You think I am joking?

I can confirm the blue one does not require any manual toggling of anything. I have one too for my ESP-01S

You mean the adapter programmer in post No-4?

Ok thanks everybody I'll try to find the same programmer (The blue board).

Try clicking on the image I gave. That is the Aliexpress listing I most recently used and the cheapest one I can find at present. :+1:

Note that I was actually buying a number of ESP-01S - the listing offers the ESP, the adapter, or both. :sunglasses:

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.