2. Introduction
The ESP8266 WiFi Module is a self contained SOC (system on a chip) with integrated
TCP/IP protocol stack that can give any microcontroller access to a WiFi network.
3. Features
Very low cost ( 3-5$ )
Pre-programmed with an AT command set firmware
Growing community
Enough on-board processing power to deal with sensors
through GPIO
Operating at 3.3V
Can draw up to 170 mA of current
6. Why do we need a Voltage regulator?
The ESP8266 may require more than the 35mA supplied by the Arduino 3.3V pin
7. Baud rate problem
The ESP-8266 comes in various firmware versions, varying also
in the operating baud rate (older operate at 115200 bauds).
My ESP8266 operates in 115200 bauds/second. This means that
we can only use hardware serial to communicate with it
(Arduino Software serial pins handle only 9600 bauds/second)
In such occasion, it is possible to use an Arduino MEGA (4x
Hardware serial couple-pins)
8. Alternative - Update firmware version
You can also use an FTDI adapter (like the FT232rl) or FTDI
cable, to communicate via USB with ESP8266
There are plenty of tutorials about how to update the firmware
version
After you have updated the firmware version you can change the
baud rate
10. Module GPIO Notes
ESP-01 GPIO0/2/16 Most common module.
ESP-02 GPIO0/2/15
ESP-03 GPIO0/2/12/13/14/15/16 Most popular in
esp8266.com poll
ESP-04 GPIO0/2/12/13/14/15/16
ESP-05 None
ESP-06 GPIO0/2/12/13/14/15/16
ESP-07 GPIO0/2/4/5/12/13/14/15/16
ESP-08 GPIO0/2/12/13/14/15/16
ESP-09 GPIO0/2/12/13/14/15 1MB Flash memory
ESP-10 None
ESP-11 GPIO0/1
11. Using Arduino IDE Serial Monitor
#include <SoftwareSerial.h>
SoftwareSerial ESPserial(2, 3); // RX | TX
void setup()
{
Serial.begin(115200); // communication with the host computer
ESPserial.begin(115200);
Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}
12. Using Arduino IDE Serial Monitor
void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
if ( ESPserial.available() ) {
Serial.write( ESPserial.read() );
}
// listen for user input and send it to the ESP8266
if ( Serial.available()) {
ESPserial.write( Serial.read() );
}
}