The first step is to download Arduino on your windows PC.
This can be downloaded from the download page. If you have it already, make sure you have at least version 1.6.4 of Arduino.
Fill in the “Additional board managers URL” this url: http://arduino.esp8266.com/package_esp8266com_index.json
Close the screen by the OK button.
Now we can add the board ESP8266 thru the boardmanager.
Click in the menu tools the menu option Board: “<Most likely Arduino UNO>”. There you will find the first option “Board Manager”
Type in the search bar, the 3 letters ESP
The arduino ESP board will be the only option left. Click on the this one. The button “Install” will appear. Click on install and wait for a minute to download the board.
In the menu Tools “Board “<Most likely Arduino UNO>”. Three new boards are added.
In my examples I use only “Generic ESP8266 Module” (When you have for example a ESP01 or ESP12 this is the board you have to choose).
Select “Generic ESP8266 Module”. The screen will be similar like this.
Press the button verify to compile your first sketch.
The software is installed successfully when you see “Done compiling”.
Assuming that you also see Generic ESP8266 Module in the bottom of the screen.
The ESP8266 does not come with an USB connector with it.
This is an additional component, required to communicate with the PC via USB.
It is called USB to TTL to adapter (In the picture you will see FT232RL FTDI USB to TTL Serial Adapter)
Connections should be like this:
USB TTL <–> ESP8266 ESP-01
GND — GND
TX — RX
RX — TX
If your USB TTL doesn’t support RTS or DTR, you have to manually set your ESP8266 into upload mode (flashmode). Both options are explained in the example blink on the end of this page.
Battery <–> ESP8266 ESP-01
battery + — VCC
battery – — GND
battery + — CH_PD
If you read all other sites you knew this already. Be aware that this should set to 3.3volt.
You may use instead a battery some other power source. Most of the power source from the USB TTL will not provide enough power to upload the sketch or to connect to your wifi network. You may try but be not disappointed if this will not work.
Select in the menu Tools , port the corresponding port of the USB-TTL adapter.
Open the serial monitor (by pressing CTRL-Shift-M or from the menu Tools).
Set the key emulation to “Both NL & CR” and the speed to 115200 baud. This can be set in the bottom of terminal screen.
If you reset the ESP8266 you will see something like this.
BTW: the first line seems like there is a lot of rubbish. This is correct. We just have to ignore that.
After you have uploaded your first sketch. Be aware that you have overwritten the AT program. This will not work anymore.
Follow the instructions in Blink for uploading your first sketch.
There are three options:
A) The best way by using RTS and DTR to upload your sketch, using NPN resistor.
B) the easy way by using RTS and DTR , but serial monitor does not work anymore
C) The hard way by using two buttons.
This is depending on the USB-TTL you have in front of you:
A) With DTR & RTS, use blink
B) With DTR & RTS, use blink (without support of serial monitor)
C) Without RTS & DTR use blink-manual-flash