Friday, 20 November 2015 22:46

Upload sketch to the ESP8266 (ESP-07/ESP-12) using Arduino IDE

ESP 07 Arduino IDE
The ESP-07/ESP-12 is a generic ESP8266 module which have no bootstapping resistors on board, insufficient decoupling capacitors, no reset circuit, and no USB-serial adapter. This is an article shows you how to connect the bootstapping resistor to the ESP-07 module and upload sketches onto the ESP-07/ESP-12 using the familiar Arduino IDE.

In order to use the ESP-07/ESP-12 module, you need to solder 4 pcs 10K ohms resistors & a filtering capacitor onto the module as shown in figure below.

ESP 07
JP1 and SW1 is required when uploading sketch, you can remove them after sketch has been uploaded.


Power the ESP-07/ESP-12 module

The ESP-07/ESP-12 module is a 3.3V device. Power the ESP-07/ESP-12 module from the USB port (5V) without a 3.3V regulator could damage the module.

During uploading sketch, I'm power the module from my USB-Serial adapter which the voltage is switched to 3.3V. However, using the power available from USB to Serial adapter is not recommended.


Hardware setup

As shown in table below is the connection between USB-Serial adapter & ESP-07/ESP-12

USB-Serial adapter ESP-07/ESP-12 module
VCC (3.3V) VCC

usb serial


Testing the ESP-07/ESP-12 module

The ESP-07/ESP-12 comes pre-programmed with AI-Thinkers firmware, it has the AT command set preinstalled. Before uploading sketch to the ESP-07/ESP-12, it's important to test it directly via a serial interface.

Assumes you already have Arduino IDE running on your computer. If you do not have Arduino IDE software on your computer, please download it from Arduino official website & install it to your computer.

  1. Complete the hardware setup as described in the Hardware Setup
  2. Plug in the USB-serial adapter to computer via USB
  3. Run the Arduino IDE
  4. Click on Tools from the Arduino IDE menu
  5. Choose the correct COM port for your USB-Serial adapter
  6. Open the Serial Monitor
  7. Choose the correct baud rate, mine is 9600
  8. Push the SW1 to reset the ESP-07/ESP-12, you should see the following output on the serial console

    [ Version:]


  9. Congratulation! Your ESP-07 is working.

Installing ESP8266 package for Arduino IDE 1.6.4 or 1.6.5

Do not use Arduino 1.6.2 and 1.6.6, if you do not have Arduino IDE1.6.4 or 1.6.5 software on your computer, please download it from Arduino official website.

  • Choose Preferences from the File menu in the Arduino IDE
  • Enter into Additional Board Manager URLs field
  • Choose Board from the Tools menu in the Arduino IDE, click on Boards Manager from the dropdown menu
  • Use the Board manager to install the ESP8266 package
    Board Manager
  • Restart the Arduino once completed installation


Uploading sketch to ESP-07/ESP-12

  • Select the correct configuration for the ESP-07/ESP-12 as shown in figure belowArduino IDE settings
  • Load a sketch into the Arduino IDE editor windows.
  • .As described in the Hardware Setup, place a jumper (JP1) between GPIO0 and GND in order to start the bootload mode.
  • Push the SW1 button to reset the ESP-07/ESP-12.
  • Click on Upload button from the Arduino IDE, the blue LED which is wired to TXD (GPIO1) will start blinking rapidly indicated uploading process is going on.
  • Remove JP1 after successfully uploading.

8 LEDs light up in sequence

8 LEDs light up in sequence

Read 93781 times Last modified on Sunday, 12 June 2016 11:47


  • Comment Link admin Tuesday, 15 March 2016 21:01 posted by admin

    You can't get 3.3V from a laptop, you need an ATX power supply from desktop computer.

  • Comment Link Shafeek Tuesday, 15 March 2016 20:45 posted by Shafeek

    Now it happends more doesnt even boots up.and the led stays like as i mentioned befor.i tried to flash the module,but the problem occurs while getting connected and it gets disconnected. Hence im not even able to flash it via flash tool nor with arduino ide.all the resistors and the capasitors ive used is as you mentioned.10k and can i get 3.3v regulated from my laptop ?. And i have orderd a new witty cloud development board since this module has became unstable.i wanted to use this for an home automation project to control relays since this module is very cheap and compact.

  • Comment Link admin Tuesday, 15 March 2016 15:35 posted by admin

    How often and for how long the problem occurs?
    What is the voltage between VCC & GND when problem occured?
    You can get 3.3V from your computer power supply.

  • Comment Link Shafeek Tuesday, 15 March 2016 05:24 posted by Shafeek

    Somthing weird is going on with my esp 12e module. Aftr that day when i connected it to vcc it started working. And aftr somtime it went off again,like it doesnt even boot up. The blue led stays on and gives a very low dim.this happens it because somthing is wrong with my supply ?. Im still operating it on arduino uno 3.3v.any help would be appreciated

  • Comment Link admin Monday, 14 March 2016 16:43 posted by admin

    I have no such problem with the "8 LEDs light up in sequence" sketch.

  • Comment Link Shafeek Sunday, 13 March 2016 01:19 posted by Shafeek

    Was able to uplode the first program. But after a while no response from the board.i was powering it from 3.3v of arduino uno and connected it via cp2102. It worked without any problem for a while then it went off and is not turning on.the led doesnot glow anymore sometims gives a dim const glow.

  • Comment Link admin Sunday, 03 January 2016 00:40 posted by admin

    It is the external components such as resistors which allows the ESP-07 works without any problem.

    C1 is a decoupling capacitor, it is 0.1uF

  • Comment Link cyril Saturday, 02 January 2016 06:25 posted by cyril

    Hi !

    Sorry for my ignorance but I cannot find any explanations online.

    Why are you the only one who talks about the lack of bootstrapping for the ESP-07 ?

    I don't know what bootstrapping means in electronic terms but I'm very surprised that I did not see anything about that in the dozen of tutorials I just read/watch.

    Is that absolutely necessary and why ?

    Also, what is the c1 value ?

    Thank you very much :)

Leave a comment

Back to Top