This is a tutorial to show you how to flash a firmware to ESP8266-01 and connect to Blynk using an ESP8266 - 01 as an Arduino wifi shield.
Hardware needed:
*Arduino Uno/Mega
*Jumper wires
*USB A to USB B cable
*ESP8266-01
Software needed:
For easy access, move or download the following software to the desktop of your Linux. It can be moved later.
*Linux or Mac for flashing firmware.
*Arduino IDE link: https://www.arduino.cc/en/main/software
*Most recent BLYNK library link: https://github.com/blynkkk/blynk-library
*Blynk_v0.3.4.zip https://github.com/blynkkk/blynk-library/releases
*pySerial link: https://sourceforge.net/projects/pyserial/files/p...
*ESP8266 blynk library: https://github.com/vshymanskyy/ITEADLIB_Arduino_W...
*esptool link: https://github.com/themadinventor/esptool
*Sdk1.0.0 v0.22 ESP8266 firmware link:
http://esp8266.ru/download/esp8266-firmware/AT22S...
*Download esp8266_flasher [For Windows]
https://github.com/Stadslab/ESP8266_example/tree/m...
*Blynk app on iphone or android.
*Download Arduino IDE
*Download most recent Blynk library
*Download the Blynk-ESP8266 library
Click the link provided, download and install the library.
*Download pySerial
Click the link provided in the intro and click what is in the red box. Make sure you move it to your desktop. Once it's there, double click the "pyserial-2.7.tar.gz" file and it will create a pyserial-2.7 folder.
*Download esptool
Click the link provided in the intro and click what is in the red box. Make sure you move it to your desktop.
*Download Sdk1.0.0 v0.22 ESP8266 firmware
This will download just by clicking the link in the intro page. Make sure you move it to your desktop. Open the "esptool-master" folder and move the "AT22SDK100-2015-03-20-boot12.bin" file into it. Then, rename it to "AT22SDK10020150320boot12.bin".
*Download esp8266_flasher [For Windows]
Download esp8266_flasher.exe
*Connect your arduino to your computer using an USB 2.0 cable.
*Open "esp8266_flasher.exe" and click on bin.
*Select the binary file "AT22SDK100-2015-03-20-boot12.bin".
*Enter proper COM port. In this case it is COM3
*Then click on download button,
*If your connections are proper the flashing will begin after erasing flash memory.
*After completion it shows "failed to leave flash mode this is OK.
*Connect your arduino to your computer using an USB 2.0 cable.
*ESP8266:____________ Arduino:
GND -------------------------- GND
GP2 -------------------------- Not connected
GP0 -------------------------- GND
RXD -------------------------- RX
TXD -------------------------- TX
CHPD ------------------------ 3.3V
RST -------------------------- Not connected
VCC -------------------------- 3.3V
*Type "cd". Next, drag the "esptool-master" folder into the terminal window and hit enter.
* Esptool-master should contain following files
[ AT22SDK10020150320boot12.bin, esptool.py, LICENCE, MANIFEST.in, README.md, setup.py ]
*Enter this command
"sudo python esptool.py --port /dev/ttyACM0 write flash 0x00000 AT22SDK10020150320boot12.bin"
Note:The port address of your arduino may be different. You can use the command “ls /dev/tty*” to list all devices.
*Arduino IDE >> Sketch >> Include library >> Add .zip library.
* And install "blynk-library-master" and "ITEADLIB_Arduino_WeeESP8266-master" libraries.
*Update the ESP8266 library from “Arduino IDE >> Sketch >> Include library >> manage library”.
ESP8266:____________ Arduino:
GND -------------------------- GND
GP2 -------------------------- Not connected
GP0 -------------------------- Not connected
RXD -------------------------- TX
TXD -------------------------- RX
CHPD ------------------------ 3.3V
RST -------------------------- Not connected
VCC -------------------------- 3.3V
We will be using a 1K POT connected to analog0 pin and an LED connected to D7 of arduino mega.
*Open Your “Blynk app” from android/iPhone get the “authentication token”.
Similarly you can also use arduino uno....
ESP8266:____________Arduino:
GND -------------------------- GND
GP2 -------------------------- Not connected
GP0 -------------------------- Not connected
RXD -------------------------- D3 (SoftwareSerial)
TXD -------------------------- D2 (SoftwareSerial)
CHPD ------------------------ 3.3V
RST -------------------------- Not connected
VCC -------------------------- 3.3V
For Arduino UNO you can use “Arduino IDE >> File >> examples >> blynk >> BoardsAndShields>> ESP8266_Shield_SoftSer”
*The “Baud rate” of ESP8266 has to be changed to 9600 in Software Serial.
*AT command “AT+UART_DEF=9600,8,1,0,0”.