I'm new to ESP-01S (Black PCB). & going to blink my own LED. I got below questions.
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?
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
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...
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...
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.
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.
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.