Programming ESP8266 (ESP-01) via Arduino
Hello friends,In this post, I will explain how to program your ESP 01 or esp8266 microcontroller via Arduino without the need for an additional programming module.
I will use the ESP 01 model as an example, but you can also program other esp8266 modules, such as Nodemcu style modules with ch340 USB communication integrated, directly through USB connection. Without further ado, let's get to the main topic.
The ESP 01 model has a total of 8 pins. These are:
- Vcc (3.3v)
- Gnd
- Rst (Reset Pin)
- Ch_PD (Enable Pin)
- Tx
- Rx
- GPIO0
- GPIO2
First, let's prepare our Arduino IDE for esp8266.
1. Open the IDE.
2. Click on File > Preferences.
3. In the opened window, enter this link into the "Additional Board Manager URLs" section and click OK.
"https://arduino.esp8266.com/stable/package_esp8266com_index.json"
4. Go to Tools > Board > Board Manager in the IDE, enter "esp8266" in the search section of the Board Manager window, and install the board support.
5. Select "Generic ESP8266 Module" as the board in the IDE and set up the port. Now, the preparations on the IDE are complete. Let's move on to the Arduino and ESP01 connections.
6. Pin connections are as follows:
- ESP - Arduino
- Tx > Tx
- Rx > Rx
- 3.3v (Vcc) > 3.3V
- Gnd > Gnd
- Ch_PD(Enable) > 3.3V
- GPIO0 > GND
Finally, since we will be programming through Arduino, connect the Reset pin of your Arduino to Gnd. This way, the compiled program is written to ESP8266, bypassing Arduino.
Programming is as simple as that. After uploading your software, to run your ESP8266, connect 3.3V to the 3.3V pin, GND to the GND pin, and finally, Ch_PD(Enable) to 3.3V.
If you get stuck at any point, feel free to write in the comments. The next post will be about mining with ESP8266. Stay well.
0 comments: