Skip to Content
Internet of Things with ESP8266
book

Internet of Things with ESP8266

by Marco Schwartz
July 2016
Intermediate to advanced
226 pages
4h 6m
English
Packt Publishing
Content preview from Internet of Things with ESP8266

Monitoring the temperature and humidity

In this second project of the chapter, we are going to do something different. We will monitor the temperature and humidity of the plant from the cloud dashboard that we already used earlier in the chapter. We are first going to configure the board, and then set up the cloud dashboard.

As we already saw how to use the aREST cloud platform earlier in the book, I will only highlight the most important parts of the code.

The first step is to include all the required libraries, including the aREST library:

#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#include <aREST.h>
#include <SHT1x.h>

Then, we give an ID to our device:

char* device_id = "gveie2y5";

As usual, you also need to put your Wi-Fi name and password ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ESP8266 Internet of Things Cookbook

ESP8266 Internet of Things Cookbook

Marco Schwartz
ESP8266 Robotics Projects

ESP8266 Robotics Projects

Pradeeka Seneviratne

Publisher Resources

ISBN: 9781786468024Supplemental Content