ESP8266 WiFi module (or shield) with default AT firmware can be used to connect your hardware to Blynk.
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.
- Check that your ESP8266 module is powered correctly and turned on
- Ensure a stable serial connection to ESP8266
- Use your USB-UART TTL converter, or this sketch to access AT command console
- Update your ESP to the latest firmware, if needed (AT v126.96.36.199 is recommended)
- Remember which Software Serial pins (or Hardware Serial#) and baud rate work for your module.
- Use Blynk -> Boards_WiFi -> ESP8266_Shield example with the same Serial configuration.
- In Blynk App, select the Board type of your main board, to which ESP8266 is connected (Uno, Mega, etc)
When using Software Serial - you have to switch ESP8266 to baud rate 9600.
Send this AT command to ESP8266:
or, for some versions:
It should reply
- 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/Megamost 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.
Software Serialis less stable than
- 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)
AT version:0.23.0.0(Apr 24 2015 21:11:01)
AT version:0.25.0.0(Jun 12 2015 20:26:28)
AT version:0.40.0.0(Aug 8 2015 14:45:58)
Ai-Thinker Technology Co.,Ltd.
Build:188.8.131.52 Sep 11 2015 11:48:04
AT version:0.60.0.0(Feb 2 2016 18:43:31)
AT version:184.108.40.206(Apr 16 2016 13:02:45)
AT version:220.127.116.11(May 11 2016 18:09:56)