Subscribe for New Projects

Using an esp8266 is a cheap and easy way to add wifi connectivity to your Arduino projects. However, for smaller projects an esp8266 can replace the Arduino entirely, making the project way cheaper, much smaller and easier to program. As the esp module is lacking a serial to usb converter we'll use an Arduino to program it.

Arduino IDE setup

As mentioned above, we'll use the arduino IDE to program the esp8266. (Download Arduino IDE here) We first have to add the esp board. To do so, navigate to File>Preferences and add:
adding esp board source to arduino ide
Figure 1.1: Adding an additional Boards Manager URL

Next, we need to install the esp board using the boards manager (Tools>Board:"">Boards Manager...). Search for esp8266 and press install.

installing esp board to arduino ide
Figure 1.2: Installing the esp8266 board

Ok, after selecting "generic esp8266  module" as seen in the figure below we are all set and can continue with wiring everything up!

selecting esp8266 board in the arduino ide
Figure 1.3: Selecting the esp8266 board

Connect esp8266 to Arduino

By pulling the esp's gpio 0 pin low we can enter programming mode. It is also important that we connect the ardunio's reset pin to ground. 

wiring diagram for programming an esp8266 with arduino
Figure 2.1: Schematic for programming an esp8266 using an Arduino uno

This sketch uses an esp8266 esp01 board. Depending on the type of esp module you want to use, check the datasheet to find out which pin is gpio 0. On some modules, the esp8266 12f for example, you also have to pull the gpio 15 pin low. Check the datasheet for more information!

Programming the esp8266

We can now hit upload like we would programming an Arduino board. Once finished, disconnect the gpio 0 pin and restart the esp module.

Get Notified of New Articles

Subscribe to get notified about new projects. Our Privacy Policy applies.
Sebastian Hirnschall
Article by: Sebastian Hirnschall
Updated: 06.08.2020


The content published on this page (with exceptions) is published under the CC Attribution-NonCommercial 3.0 Unported License. You are free to share on commercial blogs/websites as long as you link to this page and do not sell material found on* or products with said material.