Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
ESP8266 Internet of Things Cookbook
ESP8266 Internet of Things Cookbook

ESP8266 Internet of Things Cookbook: Over 50 recipes to help you master ESP8266 functionality

Arrow left icon
Profile Icon Marco Schwartz
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (5 Ratings)
Paperback Apr 2017 268 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Marco Schwartz
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2 (5 Ratings)
Paperback Apr 2017 268 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

ESP8266 Internet of Things Cookbook

Chapter 1. Configuring the ESP8266

In this chapter, we will cover:

  • Setting up the Arduino development environment for the ESP8266
  • Choosing an ESP8266
  • Required additional components
  • Uploading your first sketch to the ESP8266
  • Connecting the ESP8266 to your local Wi-Fi network
  • Connecting the ESP8266 to a cloud server
  • Troubleshooting basic ESP8266 issues

Introduction

This being the first chapter, we will be looking at how to get started with configuring the ESP8266 to connect to the Internet. This chapter will be the stepping stone to the much more fun and exciting projects that are in this book. Therefore, follow the instructions provided carefully.

In this chapter, you will learn how to set up the Arduino IDE and upload sketches to the ESP8266. You will also be guided on how to choose an ESP8266 module for your project and how to use the ESP8266 to connect to Wi-Fi networks and the Internet.

Setting up the Arduino development environment for the ESP8266

To start us off, we will look at how to set up an Arduino IDE development environment so that we can use it to program the ESP8266. This will involve installing the Arduino IDE and getting the board definitions for our ESP8266 module.

Getting ready

The first thing you should do is download the Arduino IDE if you do not already have it installed on your computer. You can do that from this link:

https://www.arduino.cc/en/Main/Software.

The web page will appear as shown. It features that latest version of the Arduino IDE. Select your operating system and download the latest version that is available when you access the link (it was 1.6.13 at the time of writing):

Getting ready

When the download is complete, install the Arduino IDE and run it on your computer.

Now that the installation is complete, it is time to get the ESP8266 definitions. Open the preference window in the Arduino IDE from File|Preferences or by pressing CTRL + Comma.

Copy this URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json.

Paste it in the file labeled Additional Board Manager URLs, as shown in the following screenshot. If you are adding other URLs too, use a comma to separate them:

Getting ready

Open the board manager from the Tools|Board menu and install the ESP8266 platform. The board manager will download the board definition files from the link provided in the preferences window and install them. When the installation is complete, the ESP8266 board definitions should appear as shown in the screenshot. Now you can select your ESP8266 board from the Tools|Board menu:

Getting ready

How it works…

The Arduino IDE is an open source development environment used for programming Arduino boards and Arduino-based boards. It is also used to upload sketches to other open source boards, such as the ESP8266. This makes it an important accessory when creating Internet of Things (IoT) projects.

See also

These are the basics for the Arduino framework and they will be applied throughout this book to develop IoT projects.

Choosing an ESP8266 board

The ESP8266 module is a self-contained System On Chip (SOC), which features an integrated TCP/IP protocol stack that allows you to add Wi-Fi capability to your projects. The module is usually mounted on circuit boards that break out the pins of the ESP8266 chip, making it easy for you to program the chip and to interface with input and output devices.

ESP8266 boards come in different forms, depending on the company that manufactures them. All the boards use Espressif's ESP8266 chip as the main controller, but they have different additional components and different pin configurations, giving each board unique additional features.

Therefore, before embarking on your IoT project, take some time to compare and contrast the different types of ESP8266 boards that are available. This way, you will be able to select the board that has features best suited for your project.

Available options

The simple ESP8266-01 module is the most basic ESP8266 board available on the market. It has eight pins, which include four General Purpose Input/Output (GPIO) pins, serial communication TX and RX pins, an enable pin and power pins, and VCC and GND. Since it only has four GPIO pins, you can only connect three inputs or outputs to it.

The 8-pin header on the ESP8266-01 module has a 2.0 mm spacing that is not compatible with breadboards. Therefore, you have to look for another way to connect the ESP8266-01 module to your setup when prototyping. You can use female to male jumper wires to do that:

Available options

The ESP8266-07 is an improved version of the ESP8266-01 module. It has 16 pins, which consist of nine GPIO pins, serial communication TX and RX pins, a reset pin, an enable pin and power pins, and VCC and GND. One of the GPIO pins can be used as an analog input pin. The board also comes with a UFL. connector that you can use to plug an external antenna in case you need to boost Wi-Fi signal.

Since the ESP8266 has more GPIO pins, you can have more inputs and outputs in your project. Moreover, it supports both SPI and I2C interfaces, which can come in handy if you want to use sensors or actuators that communicate using any of those protocols. Programming the board requires the use of an external FTDI breakout board based on USB to serial converters, such as the FT232RL chip.

The pads/pinholes of the ESP8266-07 have a 2.0 mm spacing, which is not breadboard- friendly. To solve this, you have to acquire a plate holder that breaks out the ESP8266-07 pins to a breadboard-compatible pin configuration, with 2.54 mm spacing between the pins. This will make prototyping easier.

This board has to be powered from a 3.3V, which is the operating voltage for the ESP8266 chip:

Available options

The Olimex ESP8266 module is a breadboard-compatible board that features the ESP8266 chip. As with the ESP8266-07 board, it has SPI, I2C, serial UART, and GPIO interface pins. In addition to that, it also comes with a Secure Digital Input/Output (SDIO) interface, which is ideal for communication with an SD card. This adds six extra pins to the configuration, bringing the total to 22 pins.

Since the board does not have an on-board USB to serial converter, you have to program it using an FTDI breakout board or a similar USB to serial board/cable. Moreover, it has to be powered from a 3.3V source, which is the recommended voltage for the ESP8266 chip:

Available options

The Sparkfun ESP8266 Thing is a development board for the ESP8266 Wi-Fi SOC. It has 20 pins that are breadboard-friendly, which makes prototyping easy. It features SPI, I2C, serial UART, and GPIO interface pins, enabling it to be interfaced with many input and output devices. There are eight GPIO pins, including the I2C interface pins.

The board has a 3.3V voltage regulator, which allows it to be powered from sources that provide more than 3.3V. It can be powered using a micro USB cable or Li-Po battery. The USB cable also charges the attached Li-Po battery, thanks to the Li-Po battery charging circuit on the board.

Programming has to be done via an external FTDI board:

Available options

The Adafruit Huzzah ESP8266 is a fully standalone ESP8266 board. It has a built-in USB to serial interface that eliminates the need for using an external FTDI breakout board to program it. Moreover, it has an integrated battery charging circuit that charges any connected Li-Po battery when the USB cable is connected. There is also a 3.3V voltage regulator on the board that allows the board to be powered with more than 3.3V.

Though there are 28 breadboard friendly pins on the board, only 22 are useable. Ten of those pins are GPIO pins and they can also be used for SPI as well as I2C interfacing. One of the GPIO pins is an analog pin:

Available options

What to choose?

All the ESP8266 boards will add Wi-Fi connectivity to your project. However, some of them lack important features and are difficult to work with. So the best option would be to use the module that has the most features and is easy to work with. The Adafruit ESP8266 fits the bill.

The Adafruit ESP8266 is completely standalone and easy to power, program, and configure due to its on-board features. Moreover, it offers many input/output pins that will enable you to add more features to your projects. It is affordable and small enough to fit in projects with limited space.

There's more…

Wi-Fi isn't the only technology that we can use to connect our projects to the Internet. There are other options such as Ethernet and 3G/LTE. There are shields and breakout boards that can be used to add these features to open source projects. You can explore these other options and see which works for you.

See also

Now that we have chosen the board to use in our project, you can proceed to the next step, which is understanding all the components we will use with Adafruit ESP8266 in this book.

Required additional components

To demonstrate how the ESP8266 works, we will use some additional components. These components will help us learn how to read sensor inputs and control actuators using GPIO pins. Through this you can post sensor data to the Internet and control actuators from Internet resources, such as websites.

Required components

The components we will use include:

  • Sensors:
    • DHT11
    • Photocell
    • Soil humidity
  • Actuators:
    • Relay
    • Power switch tail kit
    • Water pump
  • Breadboard
  • Jumper wires
  • Micro USB cable

Sensors

Let's discuss the three sensors that we will be using.

DHT11

The DHT11 is a digital temperature and humidity sensor. It uses a thermistor and capacitive humidity sensor to monitor the humidity and temperature of the surrounding air, and produces a digital signal on the data pin. A digital pin on the ESP8266 can be used to read the data from the sensor data pin.

Note

The DHT11 sensor is not very precise, but it is perfect for experimenting, which we'll be doing in this book.

DHT11

Photocell

A photocell is a light sensor that changes its resistance depending on the amount of incident light it is exposed to. They can be used in a voltage divider setup to detect the amount of light in the surroundings. In a setup where the photocell is used in the VCC side of the voltage divider, the output of the voltage divider goes high when the light is bright and low when the light is dim. The output of the voltage divider is connected to an analog input pin and the voltage readings can be read:

Photocell

Soil humidity sensor

The soil humidity sensor is used for measuring the amount of moisture in soil and other similar materials. It has two large exposed pads that act as a variable resistor. If there is more moisture in the soil, the resistance between the pads drops, leading to a higher output signal. The output signal is connected to an analog pin from where its value is read.

Note

This sensor is mainly used for demonstration purposes, but it is perfect for the projects we'll do in this book.

Soil humidity sensor

Actuators

Let's discuss the actuators.

Relays

A relay is a switch that is operated electrically. It uses electromagnetism to switch large loads using small voltages. It consists of three parts: a coil, spring, and contacts. When the coil is energized by a high signal from a digital pin on the ESP8266, it attracts the contacts, forcing them closed. This completes the circuit and turns on the connected load. When the signal on the digital pin goes low, the coil is no longer energized and the spring pulls the contacts apart. This opens the circuit and turns off the connected load:

Relays

Power switch tail kit

A power switch tail kit is a device that is used to control standard wall outlet devices with microcontrollers. It is already packaged to prevent you from having to mess around with high voltage wiring. Using it, you can control appliances in your home using the ESP8266:

Power switch tail kit

Water pump

A water pump is used to increase the pressure of fluids in a pipe. It uses a DC motor to rotate a fan and create a vacuum that sucks up the fluid. The sucked fluid is then forced to move by the fan, creating a vacuum again that sucks up the fluid behind it. This in effect moves the fluid from one place to another:

Water pump

Breadboard

A breadboard is used to temporarily connect components without soldering. This makes it an ideal prototyping accessory that comes in handy when building circuits:

Breadboard

Jumper wires

Jumper wires are flexible wires that are used to connect different parts of a circuit on a breadboard:

Jumper wires

Micro USB cable

A micro USB cable will be used to connect the Adafruit ESP8266 board to the computer:

Micro USB cable

See also

Having understood the components that you are going to use with Adafruit ESP8266, you can now proceed to the next step and learn how to upload sketches to your ESP8266.

Uploading your first sketch to the ESP8266

In this recipe, we are going to look at how to upload sketches to the ESP8266. This will enable you to understand some basics of the Arduino programming language and get you to upload your first sketch to your ESP8266 board.

Getting ready

Ensure that the board definitions of the ESP8266 board are installed in your Arduino IDE as explained earlier, and then connect your ESP8266 board to the computer. Now you can proceed to do the rest of the connections.

In this project, you will require a few extra components. They are:

Start by mounting the LED onto the breadboard. Connect one end of the 220 Ω resistor to the positive leg of the LED (the positive leg of an LED is usually the taller one of the two legs). Connect the other end of the resistor on another rail of the breadboard and connect one end of the jumper wire to that rail and the other end of the jumper wire to pin 5 of the ESP8266 board. Take another jumper wire and connect one if its ends to the negative leg of the LED and connect the other end to the GND pin of the ESP8266.

How to do it…

We will configure the board to output a low signal on pin 5 for a duration of one second and then output a high signal on pin 5 for a duration of two seconds. The process will repeat forever:

// LED pin
int ledPin = 5;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  
  // OFF
  digitalWrite(ledPin, LOW);                                
  delay(1000);             

  // ON
  digitalWrite(ledPin, HIGH); 
  delay(2000);                    
}

Refer the following steps:

  1. Copy the code and paste it in your Arduino IDE.
  2. Ensure your ESP8266 board is connected to your computer, and then proceed to select the board in Tools|Board menu. If the ESP8266 board definitions were properly installed, you should see a list of all ESP8266 boards in the menu:
    How to do it…
  3. Choose the board type you are using. In this case it is the Adafruit HUZZAH ESP8266.
  4. Select the serial port where the ESP8266 board is connected from the Tools|Port menu and then proceed to upload the code to your board:
    How to do it…

How it works…

This is a simple LED blinking program that we used to demonstrate how to upload code to an Adafruit ESP8266 board. The program blinks an LED connected to pin 5 of the Adafruit ESP8266 board every three seconds. This is done by turning off the LED for one second and turning on the LED for two seconds, continuously.

There's more…

The frequency at which the LED blinks can be increased or reduced by adjusting the delays in the program. For instance, the LED can be made to blink faster through reducing the second delay from two seconds to one second, by changing this statement delay(2000); to delay(1000);.

See also

Having successfully uploaded your first sketch to your ESP8266 board, you can go to the next recipe and learn how to connect your ESP8266 board to a local Wi-Fi network.

Connecting the ESP8266 to your local Wi-Fi network

In this recipe, we will show you how to connect your ESP8266 board to your local Wi-Fi network. Before you can send or receive data to and from the Internet, your ESP8266 board has to be connected to a Wi-Fi network that has Internet connectivity. This is done in the setup part of your program since it is supposed to be done once, when the ESP8266 is powered on.

Getting ready

Ensure your ESP8266 board is connected to your computer via the USB cable. No other components will be used in this exercise, since there are no inputs or outputs that are required.

How to do it…

We will include the ESP8266 library in the program and set the Wi-Fi network ssid and password so that the ESP8266 connects to the network when it gets powered on. We will print out a confirmation and the IP address of the ESP8266 when the connection is successful.

This is the sketch for this exercise:

// Libraries
#include <ESP8266WiFi.h>

// WiFi network
const char* ssid     = "your-ssid";
const char* password = "your-password";

void setup() {
  
  // Start serial
  Serial.begin(115200);
  delay(10);

  // Connecting to a WiFi network
  Serial.println();
  Serial.println();
  Serial.print("Connecting to ");
  Serial.println(ssid);
  
  WiFi.begin(ssid, password);
  
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi connected");  
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
}

void loop() {
  
}

Refer the following steps:

  1. Copy this sketch and paste it in your Arduino IDE.
  2. Change the SSID in the code from your-ssid to the name of your Wi-Fi network, and the password from your-password to the password of your Wi-Fi network.
  3. Make sure you have selected the correct board from the Tools|Board menu, which in this case is Adafruit HUZZAH ESP8266, and the correct serial port from the Tools|Port menu.
  4. Upload the code to your ESP8266 board.
  5. Open the serial monitor (and make sure that the serial speed is set at 115200) so that you can check to see whether the ESP8266 board has connected to the Wi-Fi network.

The results are as shown in the following screenshot. The ESP8266 prints its IP address once the connection has been successfully established:

How to do it…

How it works…

The program sets up the Wi-Fi SSID and password using the WiFi.begin() function of the ESP8266Wifi library, and then executes the WiFi.status() function to try to connect to the Wi-Fi network. The program checks whether the WiFi.status() function returns a true value to indicate that the ESP8266 board has successfully connected to the Wi-Fi network. If the connection was not successful, the sketch tries to connect again using the WiFi.status() function and repeats that until the WiFi.status() function returns a true value to indicate that the ESP8266 has successfully connected to the Wi-Fi network.

When the ESP8266 connects to the Wi-Fi network, the sketch displays a message, WiFi connected, and the IP address of the ESP8266 on the serial monitor.

There's more…

You can enter the wrong password and SSID and see what output you get in the serial monitor.

See also

Now that you have successfully connected your ESP8266 board to your local Wi-Fi network, you can proceed to the next recipe, where we will be connecting the ESP8266 board to the Internet.

Connecting the ESP8266 to a cloud server

In this recipe, we will connect the ESP8266 to the Internet and send data to a cloud server. The cloud server we will be sending data to is dweet.io. The data we send to dweet.io will be used later in this book, so ensure that you execute this section successfully.

Getting ready

As in the previous recipe, we won't need any extra components here. All we need to do is ensure that the ESP8266 is connected to the computer.

How to do it…

To accomplish this, follow these steps:

  1. We will connect the ESP8266 to a local Wi-Fi network that has an active Internet connection.
  2. Once the connection is successful, we will send a GET request to the cloud server and then display the reply that the server sends back to the ESP8266 board:
    // Libraries
    #include <ESP8266WiFi.h>
  3. Enter the SSID and password:
    // SSID
    const char* ssid     = "your-ssid";
    const char* password = "your-password";
  4. Store the hostname of the cloud server:
    // Host
    const char* host = "dweet.io";
  5. Configure the SSID and password of the Wi-Fi network and connect the ESP8266 to the Wi-Fi network:
    void setup() {
    
      // Serial
      Serial.begin(115200);
      delay(10);
    
      // We start by connecting to a WiFi network
      Serial.println();
      Serial.println();
      Serial.print("Connecting to ");
      Serial.println(ssid);
      
      WiFi.begin(ssid, password);
      
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
        Serial.print(".");
      }
    
      Serial.println("");
      Serial.println("WiFi connected");  
      Serial.println("IP address: ");
      Serial.println(WiFi.localIP());
    }
  6. Delay for five seconds and then print the name of the host we are connecting to on the serial monitor:
    void loop() {
      
      delay(5000);
    
      Serial.print("connecting to ");
      Serial.println(host);
  7. Connect to the host server:
      // Use WiFiClient class to create TCP connections
      WiFiClient client;
      const int httpPort = 80;
      if (!client.connect(host, httpPort)) {
        Serial.println("connection failed");
        return;
      }
  8. Formulate the URI for the GET request we will send to the host server:
      // We now create a URI for the request
      String url = "/dweet/for/my-thing-name?value=test";
  9. Send the GET request to the server and check whether the request has been received or if it has timed out:
      // Send request
      Serial.print("Requesting URL: ");
      Serial.println(url);
      
      client.print(String("GET ") + url + " HTTP/1.1\r\n" +
                   "Host: " + host + "\r\n" + 
                   "Connection: close\r\n\r\n");
      unsigned long timeout = millis();
      while (client.available() == 0) {
        if (millis() - timeout > 5000) {
          Serial.println(">>> Client Timeout !");
          client.stop();
          return;
        }
      }
  10. Read incoming data from the host server line by line and display the data on the serial monitor.
  11. Close the connection after all the data has been received from the server:
      // Read all the lines from the answer
      while(client.available()){
        String line = client.readStringUntil('\r');
        Serial.print(line);
      }
    
      // Close connecting
      Serial.println();
      Serial.println("closing connection");
    }
  12. Copy the sketch to your Arduino IDE and change the SSID in the code from your-ssid to the name of your Wi-Fi network and the password from your-password to the password of your Wi-Fi network.
  13. Upload the sketch to your ESP8266 board.
  14. Open the serial monitor so that you can view the incoming data.

The serial monitor should display data, as shown in the following screenshot:

How to do it…

As you can see from the serial monitor, when you send the GET request to dweet.io you receive a reply from the server. The reply is enclosed in curly brackets {}.

How it works…

The program connects to the Wi-Fi network using the provided password and SSID. It then proceeds to connect to the provided cloud/host server using the client.connect() function, and sends the provided URI to the host server using the client.print() function.

Once the data has been successfully sent, the sketch waits for a reply from the server. It does this with the client.available() function, which checks whether there is incoming data from the server. If there is data available, the sketch reads it and displays it on the serial monitor. The process is repeated until the ESP8266 is turned off.

There's more…

Since you have understood how to connect the ESP8266 to a cloud server, see if you can change the sketch so that it connects to the www.google.com host server and searches for the word Arduino. The results from the server should be displayed on the serial monitor.

Tip

Hint: You can check out the following link to see the format for Google GET requests:

https://www.google.com/support/enterprise/static/gsa/docs/admin/72/gsa_doc_set/xml_reference/request_format.html.

See also

You can now continue to the next recipe and look at some of the common issues that you may face when using your ESP8266 and how you can solve them.

Troubleshooting basic ESP8266 issues

There are several issues you may face when using ESP8266 boards. Here are some of the common ones and ways to solve them.

The Board is not visible from the Arduino IDE

One of the causes of this problem is a faulty USB cable. You can troubleshoot this by using another USB cable to see whether it works. If it works, then your USB cable is faulty and should be replaced. If the problem still persists, even when you are using another USB cable, the issue may be with the board definitions.

This issue can also occur when the board definitions have not been installed properly, or if they have not been installed at all. So make sure that the board definitions have been installed properly, or try and reinstall them again.

The board cannot be configured from the Arduino IDE

A faulty USB cable can cause this kind of issue. To troubleshoot, use another USB cable and see whether the issue persists. If it persists, keep your USB cable and try another solution. However, if the issue gets solved, it means that your USB cable is indeed faulty and should be replaced.

If the USB cable is not faulty but the issue continues, press the reset button on the board. That should deal with the problem.

The board does not connect to your local Wi-Fi network

If your board does not connect to your local Wi-Fi network, check your Wi-Fi network's security protocol and confirm it is WPA. If it is not, change it to WPA. Moreover, confirm the password you have written in the sketch is the correct one. Also avoid using Wi-Fi passwords with strange characters. It could also be that the serial port is not set to the right speed, therefore you might not see the Wi-Fi connected message.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Leverage the ESP8266's on-board processing and storage capability
  • Get hand- on experience of working on the ESP8266 Arduino Core and its various libraries
  • A practical and enticing recipe-based book that will teach you how to make your environment smart using the ESP8266

Description

The ESP8266 Wi-Fi Module is a self contained System on Chip (SOC) with an integrated TCP/IP protocol stack and can give any microcontroller access to your Wi-Fi network. It is capable of either hosting an application or offloading all Wi-Fi networking functions from another application processor. This book contains practical recipes that will help you master all ESP8266 functionalities. You will start by configuring and customizing the chip in line with your requirements. Then you will focus on core topics such as on-board processing, sensors, GPIOs, programming, networking, integration with external components, and so on. We will also teach you how to leverage Arduino using the ESP8266 and you'll learn about its libraries, file system, OTA updates, and so on. The book also provide recipes on web servers, testing, connecting with the cloud, and troubleshooting techniques. Programming aspects include MicroPython and how to leverage it to get started with the ESP8266. Towards the end, we will use these concepts and create an interesting project (IOT). By the end of the book, readers will be proficient enough to use the ESP8266 board efficiently.

Who is this book for?

This book is targeted at IOT enthusiasts who are well versed with electronics concepts and have a very basic familiarity with the ESP8266. Some experience with programming will be an advantage.

What you will learn

  • Measure data from a digital temperature and humidity sensor using the ESP8266
  • Explore advanced ESP8266 functionalities
  • Control devices from anywhere in the world using MicroPython
  • Troubleshoot issues with cloud data monitoring
  • Tweet data from the Arduino board
  • Build a cloud-connected power-switch with the ESP8266
  • Create an ESP8266 robot controlled from the cloud

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 27, 2017
Length: 268 pages
Edition : 1st
Language : English
ISBN-13 : 9781787288102
Category :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Apr 27, 2017
Length: 268 pages
Edition : 1st
Language : English
ISBN-13 : 9781787288102
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 126.97
Internet of Things with ESP8266
$43.99
ESP8266 Home Automation Projects
$38.99
ESP8266 Internet of Things Cookbook
$43.99
Total $ 126.97 Stars icon

Table of Contents

8 Chapters
1. Configuring the ESP8266 Chevron down icon Chevron up icon
2. Your First ESP8266 Projects Chevron down icon Chevron up icon
3. More ESP8266 Functions Chevron down icon Chevron up icon
4. Using MicroPython on the ESP8266 Chevron down icon Chevron up icon
5. Cloud Data Monitoring Chevron down icon Chevron up icon
6. Interacting with Web Services Chevron down icon Chevron up icon
7. Machine to Machine Interactions Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.2
(5 Ratings)
5 star 20%
4 star 40%
3 star 0%
2 star 20%
1 star 20%
Carlos Mateos Oct 20, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Seleccione entre varios con similar tema. Desde la selección, seguimiento hasta la entrega todo fue muy bien. Llego en buen estado. El contenido muy bueno para nosotros los aprendices.
Amazon Verified review Amazon
Brendan Ryan May 08, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Good intro to ESP8266 and all things IOT
Amazon Verified review Amazon
P. Brown Nov 04, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Quite a good book, felt there was something missing but apart from that I still recommend it to anyone starting off with esp8266 devices.
Amazon Verified review Amazon
Derek S. Jun 28, 2017
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
I would have bought the Kindle version because this sounds like a good book but did not. The simple reason is that a downloadable version has no "hardware" costs and so should be considerably cheaper. This is way overpriced for a downloadable version of anything. The author should accept that a lot of downloads at low price is better than none at a high price.
Amazon Verified review Amazon
Ike Mitchell May 02, 2020
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Is only applicable to a specific board. Can’t easily use with generic cheap but good node mcu versions. Hard to return once you figure that out
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.