As in 14.1 Serial, an ESP8266 Wifi module has been connected to the virtual serial pin 10 and pin 11 on Arduino UNO. In this section, we'll talk about how to use this ESP8266 Wifi module a bit more.
An ESP8266 wifi module is provided in our Arduino course on-site, which looks like:
Espressif ESP8266
And its pins are defined as:
Espressif ESP8266 Pin Definitions
Hardware Wiring
We still use the same hardware wiring way as in 14.1 Serial to wire the Arduino UNO and ESP8266.
Sketch
The same sketch in 14.1 Serial is also adopted here.
Mobile APPs
Option 2: Use ESP8266 without Arduino Board
It is also possible to run the sketch on the ESP8266 program without using an Arduino UNO board, for ESP8266 comes with a MCU inside the module itself.
Both websites adopt Arduino IDE to implement/verify/compile the sketch, and flash/download the binary code onto an ESP8266 via Arduino UNO R3 board. Let's just see how it goes.
Note: You do need a FD232RS as a proxy/bridge, which looks as follows:
FTDI FT232RL USB to TTL Serial Adapter 3.3V/5V switch
Then, restart Arduino IDE. Click Tools->Board->Board Manager, then we search esp, make sure Arduino AVR Boards and esp8266 are installed. Please refer to the following image:
Arduino ESP8266
Note: Without the installed Arduino AVR Boards, you will possibly meet the following ERROR message:
Afterwards, we select Tools->Board->Generic ESP8266 Module.
STEP 4 - Sketch Upload ERROR
After we selected Board: "Generic ESP8266 Module", we are now trying to upload (after verify/compile) any sketch (here, the default EMPTY sketch for testing) to Arduino board with ESP8266connected. You will see the following ERROR messages:
espcomm Errors
By clicking Tools->ESP8266 Sketch Data Upload, you will see the following dialog:
Create SPIFFS image
By clicking Yes, the same ERROR messages will be given as:
You can also purchase an Arduino Wifi Shield recommended by official Arduino website(s), and accomplish Wifi communication. Please refer to the following official Arduino webpages: