Introduction: Getting Started to Esp 8266

WARNING: This cheap thing is not as easy as it looks to get it up and running.

If you have been roaming here and there looking for complete Guide for ESP 8266. YOU have arrived at the perfect place.

Hope you all are doing good and enjoying learning. Today, after working almost for a month on this ESP 8266 or ESP 01 module, i though why not share things that I have faced a lot difficult, so that new people don't have to face many difficulties to get this thing going.

The biggest challenge was to gather information about this module. This small module looks cute buts its very annoying because it just don't work as easy as we think.

ESP 8266 is a stand alone Micro controller. It has its own memory, GPIO pins and serial communication protocols. Its a system on chip.

IT is highly recommended to go through all the documents before jumping into it.

In this Instructable, I will cover those things that worked for me.

Disclaimer : It may or may not work for you. but i will try to cover all those problems that I have face and how I have solved them. If you have some other problems, you are welcome.

Step 1: Introduction to ESP-01

In this instructable, I will be measuring my room temperature using DHT 11 sensor with the help of arduino. Then i will be sending this information to my Android phone with the help of Blynk cloud and andriod application.

You can see the flow of data from the picture.

Step 2: Basic Components Needed



DHT 11 sensor


Step 3: Update Firmware

First thing that you need to do when you got your ESP is to flash the latest firmware into esp module.

Flashing the new firmware can be done using many different methods.


Its not necessary that every firmware works with every cloud. so you have to make sure that the cloud you are going to use, works well with your firmware. Do some web searching, spend some time you will figure it out with time.

If you have FTDI programmer, or Usb adapter for flashing the firmware then, follow the following video:

If you don't have any adapter and you want to flash the firmware. You can use Arduino Uno to program your ESP. follow following steps:

First: Upload blank sketch in Arduino Uno, Disconnect Arduino

Second: make the circuit as shown in the Diagram

Third: Download the Flasher from following link

Forth: download the firmware fro the link provided

Fifth: Open flasher, plugin your arduino, select COM port on whoch arduino is connected, browse for Firmware downloaded earlier. Hit Download.

** IF failed, make sure GPIO_0 is grounded, right com port is selected, connections are good.

If everything was fine, then close FLASHER, Arduino IDE, Disconnect the power, and try again.


Make sure that GPIO-0 pin is connected to GROUND before powering up the ESP. if you are using USB adapter then you have to do some extra effort to add a push button from GPIO_0 to ground.

Step 4: Disconnect GPIO-0 From GND

After the firmware is done, Remove the GPIO_0 pin from GND.

Remove the power and power back on with GPIO_0 left open.

Open Arduino IDE.

Select the Board and Com port.

Open Serial Monitor. Select 115200 Baud rate. Test some AT commands.

You can test commands from the link given below.

You are good to go.

NOTE: If you are using Arduino uno, You have to use Software Serial. so for Software Serial your max Baud rate is 9600.

By Default, Esp Baud rate is 115200. You have to change it to 9600 using At commands.

following command will set your ESP baud rate to 9600.


Step 5: Program Your Arduino

Now you need to program your arduino to communicate with ESP module throgh Serial communication.

I am using Blyink interface. just simply follow the video i have shared above to get things going with BLYNK.

Download all the necessary libraries of Blynk for Arduino.

These libraries cant not be added through Include Libraries option from arduino IDE. You have to paste them manually to get it work it properly.

Visit the following link and follow the instructions.

after you have added the libraries, go to Examples and open the example shown in the picture. Compile the code.

If you face problem compiling, Error, "ESP8266_lib.h not found", or something similar to this then

download the following zip library.

include the zip library using Arduino IDE. now it should compile without any error.

Thats it.

Step 6: Download the Application

Download the BLYNK application form appstore. register and create new project. After creating new project, Authentication Token will be send to your email account. Add this authentication code in the Arduino as defined in the sketch.

Step 7: Arduino Code for DHT 11 Sensor.

Your code will work if your hardware would be same as my software.

I have connected DHT sensor pin number 2 with Arduino Pin 6.

led1 at pin 8(on/off using App)

led2 at pin 10(fade using App)


Make sure you have right Flasher and firmware that can work with your cloud. If firmware don't work for you, try different firmwares.

The most Common factor of failing to Flash Firmware in ESP is the 3.3v POWER SUPPLY. The led on Esp would be blinking but it would not be working properly. Make sure you have power supply that can provide reasonable mA current. Arduino 3.3V can not provide enogh current, thats why Flashing would be failed.

Second thing is GPIO_0 is not grounded.

Make Sure you have provide SSID and PASSWORD of the network that you want the ESP to connect with it in the arduino code. Make sure you have stable network. If your network is open then just leave it like this.(Password="";)

If you are facing any problem, then email me your problem, maybe i would help. I just figured out that working with ESP was not easy. so maybe my little effort made someone's day or might help someone who is stuck in somewhre.

Thankyou, and Happy Learning. If you have knowledge then its your right to deliver it to other. Sharing make us growing and will made this world a better place.

If you are facing problem, Its your problem you Have to find a way out.

You are not alone having problems, so be calm and don't give up, try searching with different keywords, you will get it done sooner or later.

Take care.

Ammar Khalil

Electronics Tips & Tricks Challenge

Participated in the
Electronics Tips & Tricks Challenge