SlideShare a Scribd company logo
ESP8266
“Designed for the needs of an increasingly connected world”
Pavlos Isaris
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.
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
● Not breadboard-friendly :-(
Βreadboard friendly version (ESP-12)
Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)
Why do we need a Voltage regulator?
The ESP8266 may require more than the 35mA supplied by the Arduino 3.3V pin
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)
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
Multiple variations
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
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("");
}
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() );
}
}
Basic AT commands
Checking for available WiFi networks
Connect to Network
See details
Send a request
Allow multiple connections
Start connection
Specify bytes to be sent
In this case it is “GET /
HTTP/1.0rnrn”
Get the response back
Acting as TCP Server
Acting as a Wifi Access point
ESP8266 core-library
#include <Adafruit_ESP8266.h>
#include <SoftwareSerial.h>
#define ARD_RX_ESP_TX 2
#define ARD_TX_ESP_RX 3
#define ESP_RST 4
SoftwareSerial softser(ARD_RX_ESP_TX, ARD_TX_ESP_RX);
Adafruit_ESP8266 wifi(&softser, &Serial, ESP_RST);
#define ESP_SSID "SSIDNAME" // Your network name here
#define ESP_PASS "PASSWORD" // Your network password here
#define HOST "www.adafruit.com" // Host to contact
#define PAGE "/testwifi/index.html" // Web page to request
#define PORT 80 // 80 = HTTP default port
ESP8266 core-library
softser.begin(9600); // Soft serial connection to ESP8266
Serial.begin(57600); while(!Serial); // UART serial debug
wifi.connectToAP(F(ESP_SSID), F(ESP_PASS))
Serial.print(F("OKnRequesting page..."));
if(wifi.requestURL(F(PAGE))) {
Serial.println("OKnSearching for string...");
if(wifi.find(F("working"), true)) {
Serial.println(F("found!"));
} else {
Serial.println(F("not found."));
}
} else { // URL request failed
Serial.println(F("error"));
}
wifi.closeTCP();
Espert - Development board
http://www.espert.co/ (v2.0 To be released by April 2016.)

More Related Content

PPTX
Esp8266 - Intro for dummies
PDF
Cassiopeia Ltd - ESP8266+Arduino workshop
PDF
OCP 2015 summit_honey badger_and_panther+_update
PDF
Adafruit Huzzah Esp8266 WiFi Board
PPTX
Remote tanklevelmonitor
PPTX
[5]投影片 futurewad樹莓派研習會 141218
PDF
Controlling the internet of things using wearable tech - Design+Code Day; Ara...
PDF
WiFi SoC ESP8266
Esp8266 - Intro for dummies
Cassiopeia Ltd - ESP8266+Arduino workshop
OCP 2015 summit_honey badger_and_panther+_update
Adafruit Huzzah Esp8266 WiFi Board
Remote tanklevelmonitor
[5]投影片 futurewad樹莓派研習會 141218
Controlling the internet of things using wearable tech - Design+Code Day; Ara...
WiFi SoC ESP8266

What's hot (20)

PDF
lesson2 - Nodemcu course - NodeMCU dev Board
PPTX
Esp8266 NodeMCU
PDF
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
PDF
Programando o ESP8266 com Python
PPTX
Nodemcu - introduction
PDF
lesson1 - Getting Started with ESP8266
PPTX
Arduino 習作工坊 - Lesson 1 燈光之夜
PDF
Esp8266 wi fi_module_quick_start_guide_v_1.0.4
PPTX
Remote temperature monitor (DHT11)
PPTX
Arduino & NodeMcu
PDF
NodeMCU ESP8266 workshop 1
PDF
Introduction to ESP32 Programming [Road to RIoT 2017]
PPT
Arduino Meetup with Sonar and 433Mhz Radios
PDF
FSEC 2014 - I can haz your board with JTAG
PDF
Raspberry Pi - best friend for all your GPIO needs
PDF
IPC2 - Block Diagram
PDF
lwM2M OTA for ESP8266
PDF
NodeMCU with Blynk and Firebase
DOCX
Lab 9 instructions
PDF
Esp8266 basics
lesson2 - Nodemcu course - NodeMCU dev Board
Esp8266 NodeMCU
Home automation-in-the-cloud-with-the-esp8266-and-adafruit-io
Programando o ESP8266 com Python
Nodemcu - introduction
lesson1 - Getting Started with ESP8266
Arduino 習作工坊 - Lesson 1 燈光之夜
Esp8266 wi fi_module_quick_start_guide_v_1.0.4
Remote temperature monitor (DHT11)
Arduino & NodeMcu
NodeMCU ESP8266 workshop 1
Introduction to ESP32 Programming [Road to RIoT 2017]
Arduino Meetup with Sonar and 433Mhz Radios
FSEC 2014 - I can haz your board with JTAG
Raspberry Pi - best friend for all your GPIO needs
IPC2 - Block Diagram
lwM2M OTA for ESP8266
NodeMCU with Blynk and Firebase
Lab 9 instructions
Esp8266 basics
Ad

Viewers also liked (20)

PDF
Resume 9-7
PPTX
Rain Drop Sensor using Arduino!
PDF
ROBOTIC SHELF STOCK MONITORING SYSTEM
PPT
FEM Optimization Project
PPTX
A versatile wireless sensor device for security alerts and home automation
PDF
CoolCATS project: eShoe
PPTX
Home automation
PPTX
IoTlondon - mbed based IoT Gateway talk
PDF
final_report
PPTX
S home
PDF
Meetup9 iot sensors and security
PDF
Trends of IoT Technology for industrial prototyping and educational markets
PPTX
Rain Light Sensor
PDF
Wi-Fi For Beginners - Module 1- What is WiFi?
PPTX
Home automation
PPTX
Labview based wireless sensor for monitoring the building
DOC
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
PPTX
Smart sensors and their Application
PDF
IoT sensor devices
PPTX
Types of sensors
Resume 9-7
Rain Drop Sensor using Arduino!
ROBOTIC SHELF STOCK MONITORING SYSTEM
FEM Optimization Project
A versatile wireless sensor device for security alerts and home automation
CoolCATS project: eShoe
Home automation
IoTlondon - mbed based IoT Gateway talk
final_report
S home
Meetup9 iot sensors and security
Trends of IoT Technology for industrial prototyping and educational markets
Rain Light Sensor
Wi-Fi For Beginners - Module 1- What is WiFi?
Home automation
Labview based wireless sensor for monitoring the building
SMS(GSM)BASED HOME AUTOMATION SYSTEM PROJECTS-ECE/EEE/E&I/ICE
Smart sensors and their Application
IoT sensor devices
Types of sensors
Ad

Similar to Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris) (20)

PPTX
New Microsoft PowerPoint Presentation.pptx
DOCX
PPTX
01_DIGITAL IO.pptx
PDF
Introduction to Arduino
PDF
FPGA Based IP Core Initialization for Ps2-Vga Peripherals Using Microblaze Pr...
PDF
Introducing the Arduino
PDF
Practical Introduction to Internet of Things (IoT)
PPTX
How to use an Arduino
PDF
ESP12.OLED_V1 Datasheet EN - Universal ESP8266 controller board with 0.96″ I2...
PDF
Arduino arduino boardnano
DOCX
The arduino uno is a microcontroller board based on the
PDF
aA000047
PPTX
Electronics Microcontrollers for IoT applications
PPTX
Intel galileo gen 2
PDF
Arduino uno
PPT
Overview of ST7 8-bit Microcontrollers
PDF
Education Documantary
PDF
Android Things Linux Day 2017
PDF
Syed IoT - module 5
PPTX
Any Surface Drum Kit
New Microsoft PowerPoint Presentation.pptx
01_DIGITAL IO.pptx
Introduction to Arduino
FPGA Based IP Core Initialization for Ps2-Vga Peripherals Using Microblaze Pr...
Introducing the Arduino
Practical Introduction to Internet of Things (IoT)
How to use an Arduino
ESP12.OLED_V1 Datasheet EN - Universal ESP8266 controller board with 0.96″ I2...
Arduino arduino boardnano
The arduino uno is a microcontroller board based on the
aA000047
Electronics Microcontrollers for IoT applications
Intel galileo gen 2
Arduino uno
Overview of ST7 8-bit Microcontrollers
Education Documantary
Android Things Linux Day 2017
Syed IoT - module 5
Any Surface Drum Kit

Recently uploaded (20)

PPT
Lines and angles cbse class 9 math chemistry
PDF
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PPTX
ERP good ERP good ERP good ERP good good ERP good ERP good
PPTX
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
PPTX
"Fundamentals of Digital Image Processing: A Visual Approach"
PDF
-DIGITAL-INDIA.pdf one of the most prominent
PDF
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
PPTX
material for studying about lift elevators escalation
PPTX
Nanokeyer nano keyekr kano ketkker nano keyer
PPTX
Sem-8 project ppt fortvfvmat uyyjhuj.pptx
PDF
Smarter Security: How Door Access Control Works with Alarms & CCTV
PPTX
Lecture 3b C Library _ ESP32.pptxjfjfjffkkfkfk
PPTX
Embedded for Artificial Intelligence 1.pptx
PDF
How NGOs Save Costs with Affordable IT Rentals
PPTX
Fundamentals of Computer.pptx Computer BSC
PPTX
PLC ANALOGUE DONE BY KISMEC KULIM TD 5 .0
PPT
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
PPTX
Lecture-3-Computer-programming for BS InfoTech
PPTX
Operating System Processes_Scheduler OSS
PPTX
INFERTILITY (FEMALE FACTORS).pptxgvcghhfcg
Lines and angles cbse class 9 math chemistry
Dynamic Checkweighers and Automatic Weighing Machine Solutions
ERP good ERP good ERP good ERP good good ERP good ERP good
02fdgfhfhfhghghhhhhhhhhhhhhhhhhhhhh.pptx
"Fundamentals of Digital Image Processing: A Visual Approach"
-DIGITAL-INDIA.pdf one of the most prominent
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
material for studying about lift elevators escalation
Nanokeyer nano keyekr kano ketkker nano keyer
Sem-8 project ppt fortvfvmat uyyjhuj.pptx
Smarter Security: How Door Access Control Works with Alarms & CCTV
Lecture 3b C Library _ ESP32.pptxjfjfjffkkfkfk
Embedded for Artificial Intelligence 1.pptx
How NGOs Save Costs with Affordable IT Rentals
Fundamentals of Computer.pptx Computer BSC
PLC ANALOGUE DONE BY KISMEC KULIM TD 5 .0
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
Lecture-3-Computer-programming for BS InfoTech
Operating System Processes_Scheduler OSS
INFERTILITY (FEMALE FACTORS).pptxgvcghhfcg

Athens IoT Meetup #3 - Introduction to ESP8266 (Pavlos Isaris)

  • 1. ESP8266 “Designed for the needs of an increasingly connected world” Pavlos Isaris
  • 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 ● Not breadboard-friendly :-(
  • 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() ); } }
  • 14. Checking for available WiFi networks
  • 17. Send a request Allow multiple connections Start connection Specify bytes to be sent In this case it is “GET / HTTP/1.0rnrn”
  • 19. Acting as TCP Server
  • 20. Acting as a Wifi Access point
  • 21. ESP8266 core-library #include <Adafruit_ESP8266.h> #include <SoftwareSerial.h> #define ARD_RX_ESP_TX 2 #define ARD_TX_ESP_RX 3 #define ESP_RST 4 SoftwareSerial softser(ARD_RX_ESP_TX, ARD_TX_ESP_RX); Adafruit_ESP8266 wifi(&softser, &Serial, ESP_RST); #define ESP_SSID "SSIDNAME" // Your network name here #define ESP_PASS "PASSWORD" // Your network password here #define HOST "www.adafruit.com" // Host to contact #define PAGE "/testwifi/index.html" // Web page to request #define PORT 80 // 80 = HTTP default port
  • 22. ESP8266 core-library softser.begin(9600); // Soft serial connection to ESP8266 Serial.begin(57600); while(!Serial); // UART serial debug wifi.connectToAP(F(ESP_SSID), F(ESP_PASS)) Serial.print(F("OKnRequesting page...")); if(wifi.requestURL(F(PAGE))) { Serial.println("OKnSearching for string..."); if(wifi.find(F("working"), true)) { Serial.println(F("found!")); } else { Serial.println(F("not found.")); } } else { // URL request failed Serial.println(F("error")); } wifi.closeTCP();
  • 23. Espert - Development board http://www.espert.co/ (v2.0 To be released by April 2016.)