ESP8266 WiFi module (or shield) with default AT firmware can be used to connect your hardware to Blynk.

ESP8266 Shields

These come in different shapes and colors, but basically you can use simple ESP01 module like this:

If you have an Arduino Shield with ESP8266 (like doit.com ESP13 Shield), you don't need to do this wiring - that is already done for you!

☝️ This connection type is very tricky to start with. As a MUCH easier option, we recommend to start with  ESP8266 as a standalone platform (Blynk can run directly on ESP8266 chip).

 

☝️ This method does not work with this Arduino UNO WIFI board (at least until Arduino provides proper TCP libraries).

---

First of all, it is recommended to buy a USB-UART TTL converter, capable to supply 1A @ 3.3V. This will help you in lots of different cases, not only for ESP8266. For ESP8266, it will be needed for initial configuration and testing, AT firmware upgrade, etc.

☝️ If you run ESP8266-standalone example on your ESP8266 module, it overwrites AT firmware of the module, so it won't work as modem. Make sure your ESP is flashed with AT firmware (you can find stable firmware here, flash it to 0x00000 using this guide for example).

For this connection, Blynk uses ESP8266_Lib.h library, which you get automatically when you install Blynk libraries.

Getting Started

  1. Check that your ESP8266 module is powered correctly and turned on
  2. Ensure a stable serial connection to ESP8266
  3. Use your USB-UART TTL converter, or this sketch to access AT command console
  4. Update your ESP to the latest firmware, if needed (AT v1.1.0.0 is recommended)
  5. Remember which Software Serial pins (or Hardware Serial#) and baud rate work for your module.
  6. Use Blynk -> Boards_WiFi -> ESP8266_Shield example with the same Serial configuration.
  7. In Blynk App, select the Board type of your main board, to which ESP8266 is connected (Uno, Mega, etc)

Software Serial

When using Software Serial - you have to switch ESP8266 to baud rate 9600.
 Send this AT command to ESP8266:

AT+UART_DEF=9600,8,1,0,0

or, for some versions:

AT+CIOBAUD=9600

It should reply OK.

Troubleshooting

  • Failing to read the comments in the sketch and amending it accordingly for the specific hardware.
  • Powering ESP8266 from 3v3 pin on Arduino UNO/Nano/Mega most likely won't work.
  • Use a separate 3.3V source, that can provide up to 1A, like AMS1117.
  • Baud rate of ESP8266 should match with Arduino Serial baud rate. Or TX/RX pins could be swapped by mistake.
  • Ensure Arduino can communicate with ESP8266 with AT commands.
  • Using Software Serial is less stable than Hardware Serial.
  • Try using boards with a dedicated hardware Serial pins, like Leonardo, Mega, Teensy, etc.
  • Trying to run a sketch with Serial Monitor open in shield mode.
  • Weak WiFi signal.
  • Poor circuit construction.

If you constantly get "ESP is not responding" - please be patient and try looking for available solutions on our community forum.

Some useful recommendations about writing Blynk sketches can be found here: http://community.blynk.cc/t/solved-disconnect-cmd-skipped-etc-issues-my-advice/5362

Blynk was tested with following AT firmware versions:

AT version:0.22.0.0(Mar 20 2015 10:04:26)
SDK version:1.0.0

AT version:0.23.0.0(Apr 24 2015 21:11:01)
SDK version:1.0.1

AT version:0.25.0.0(Jun 12 2015 20:26:28)
SDK version:1.1.2

AT version:0.40.0.0(Aug  8 2015 14:45:58)
SDK version:1.3.0
Ai-Thinker Technology Co.,Ltd.
Build:1.3.0.2 Sep 11 2015 11:48:04

AT version:0.60.0.0(Feb  2 2016 18:43:31)
SDK version:1.5.2(80914727)

AT version:1.0.0.0(Apr 16 2016 13:02:45)
SDK version:1.5.3(aec24ac9)

AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)

☝️  While it seems to work with all of these versions, we observed that the AT version 1.1.0.0 works best.

Did this answer your question?