Connecting ESP8266-01 to Arduino UNO/MEGA and BLYNK

Connecting ESP8266-01 to Arduino UNO/MEGA and BLYNK © GPL3+

This tutorial shows how to flash firmware on the ESP8266-01. Also how to connect the ESP8266-01/Arduino to Blynk.

  • 36,110 views
  • 8 comments
  • 25 respects

Components and supplies

Apps and online services

About this project

This is a tutorial to show you how to flash firmware to ESP8266-01 and connect to Blynk using an ESP8266-01 as an Arduino WiFi shield.

Software

For easy access, move or download the following software to the desktop of your Linux machine. It can be removed later. You will need a Linux or Mac computer for flashing firmware.

Download these programs:

  • The Latest ESP8266 firmware: Sdk1.0.0 v0.22 ESP8266: http://esp8266.ru/download/esp8266-firmware/AT22S... (Russian) Open the "esptool-master" folder and move the "AT22SDK100-2015-03-20-boot12.bin" file into it. Then, rename it to "AT22SDK10020150320boot12.bin".

For Windows

For Linux

  • pySerial

Connections for flashing the ESP using Arduino

Connect your Arduino to your computer using an USB 2.0 cable. Connect your ESP8266 to the Arduino:

ESP8266:_________ Arduino:

  • GND -------------------------- GND
  • GP2 -------------------------- Not connected
  • GP0 -------------------------- GND
  • RXD -------------------------- RX
  • TXD -------------------------- TX
  • CHPD ------------------------ 3.3V
  • RST -------------------------- Not connected
  • VCC -------------------------- 3.3V

Flashing from Windows

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.

Flashing from Linux

Open the pySerial directory you downloaded in a terminal.

Enter this command “python setup.py install" into the terminal (note: you must be root).

(If your terminal doesn’t have root/administrator/Superuser privilege access use "sudo python setup.py install" and enter password when asked.)

Open the "esptool-master" folder in the terminal. It should contain following files:

  • AT22SDK10020150320boot12.bin
  • esptool.py
  • LICENCE
  • MANIFEST.in
  • README.md
  • setup.py

Do "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.

Add the Blynk library and the Blynk-ESP8266 library to your Arduino IDE.

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”.

Connections for Arduino MEGA

ESP8266:____________ Arduino MEGA:

  • 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”.

  • Open the code inArduino IDE >> File >>examples >> blynk >> BoardsAndShields>> ESP8266_Shield_HardSer
  • Add your authentication token to the code
  • Enter "SSID" and "PASSWORD" in respective fields.
  • Upload the code to your Arduino.

Connections for Arduino Uno

Similarly you can also use Arduino Uno.

ESP8266:____________Arduino Uno:

  • 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”.

Connecting, controlling and monitoring Arduino pins using Blynk app

In the Serial monitor you can see that the connection has been established with Blynk server. Digital Pin 7 of Arduino mega --------->>controlled by Blynk app.

Analog Pin 0 data from Pot -------- >> displayed on graph.

Comments

Similar projects you might like

Control Arduino Uno Using ESP8266 WiFi Module and Blynk App

Project tutorial by Adithya TG

  • 5,254 views
  • 10 comments
  • 18 respects

Connect to Blynk using ESP8266 as Arduino Uno wifi shield

Project tutorial by Nolan Mathews

  • 71,156 views
  • 11 comments
  • 50 respects

Monitoring Temperature Remotely with Blynk for Dummies

Project in progress by Cmtelesann

  • 3,081 views
  • 4 comments
  • 11 respects

Add WiFi to Arduino UNO

by Jefferson Paredes

  • 147,054 views
  • 58 comments
  • 93 respects

ESP8266 ESP-01 Webserver

by Robin

  • 100,368 views
  • 18 comments
  • 131 respects
Add projectSign up / Login