ESP-01 (01S) How to Program using any Arduino Board
Here you will learn how to program the ESP-01 using any Arduino Board and Arduino IDE.
There are several programmers dedicated exclusively to programming microcontrollers, such as the FTDI board used here. However, sometimes we don´t have one of these programmers, so we have to use other alternatives. Of these alternatives, I highlight here the Arduino UNO, since it has a programmer and it has serial communication pins accessible, as you can see in the electrical schematic.
Note: It is mandatory to bypass the microcontroller of the board that you will be used to program the ESP-01. In this case, the bypass is carried out by connecting the RESET pin to the GND.
As you can see in the video, the flashing LED is blue and is present in the ESP-01.
Parts Required
- ESP-01 or ESP-01S;
- Arduino Board (UNO, Mega …);
- 2 x 10 kΩ resistor (can be 10 kΩ +- 3 kΩ);
- 2 Buttons;
- Breadboard;
- Jumper wires.
Programming Procedure
There are several ways to program the ESP-01, in this case, the circuit shown in the initial figure is used. This circuit has two buttons that allow you to enter the ESP-01 programming mode, to send the program from the computer to the ESP through an Arduino Board or other that contains a programmer and serial communication pins (Tx and Rx) that allow you to connect the ESP-01. The connection with other programming boars is made with the same principle used in the electrical circuit presented in this tutorial.
You can use any example code from blink to LED and you can use the code provided below.
Step 1: Enter programming mode by pressing the FLASH and RESET buttons;
Step 2: Release the RESET button and then release the FLASH button. You are in programming mode (first RESET button and then FLASH button);
Step 3: Upload blink program from Arduino IDE (code below);
Step 4: Click on RESET button to restart ESP-01.
Step 5: Enjoy!! But, if it didn’t work, see the next paragraph!
If the LED does not blink, you can change the pin on the first line of the code, because some ESP-01 boards have the LED connected to another pin. If you use ESP-01S you should change to Pin 2.
Note: Using INBUILT LED (LED on ESP Board), you cannot use Serial communication because this LED pin is used for TX serial communication.
Code
If you want to connect the led to another pin, you can change the first line of the code by placing the pin you want, replacing “1” with the number of the pin that you want. If you use ESP-01S you should change to Pin 2.
2 thoughts on “ ESP-01 (01S) How to Program using any Arduino Board ”
The video is not clear you can use stable camera or just instruct or circuit diagram in video as well i tried with so many videos but still i didnt get the solution so that i can program esp 01 wifi module
Источник: