Reader small image

You're reading from  ESP8266 Home Automation Projects

Product typeBook
Published inNov 2017
PublisherPackt
ISBN-139781787282629
Edition1st Edition
Tools
Right arrow
Authors (2):
Catalin Batrinu
Catalin Batrinu
author image
Catalin Batrinu

Catalin Batrinu graduated from the Politehnica University of Bucharest in Electronics, Telecommunications, and Information Technology. He has been working as a software developer in telecommunications for the past 16 years. He has worked with old protocols and the latest network protocols and technologies, so he has experienced all transformations in the telecommunication industry. He has implemented many telecommunications protocols, from access adaptations and backbone switches to high-capacity, carrier-grade switches on various hardware platforms from Wintegra and Broadcom. Internet of Things came as a natural evolution for him and now he collaborates with different companies to construct the world of tomorrow that will make our life more comfortable and secure. Using the ESP8266, he has prototyped devices such as irrigation controllers, smart sockets, window shutters, Digital Addressable Lighting Controls, and environment controls, all of them controlled directly from a mobile application over the cloud. An MQTT broker with bridging and a WebSockets server was even developed for the ESP8266. Soon, all those devices will be part of our daily life, so we will all enjoy their functionality.
Read more about Catalin Batrinu

View More author details
Right arrow

How to install a library


In some chapters of this book, different libraries are needed; so let's see how a library can be installed.

The installed SDK has some basic libraries, but for sure, you will need more libraries to read various sensors, to parse JSON data, or to send MQTT messages. For the libraries that are referenced in the SDK repository, you just need to install them but for those that are not, you need to install them manually.

Libraries from the Arduino's repository

Some libraries exist in the official repository and you can install them in the following steps:

  1. If it exists, then just go to Sketch | Include Library | Manage Libraries:
  1. In a new window, delete the "Filter your search..." and write Arduino Json. The Arduino IDE will then search this library for you and if it has found it, you will be able to install it by clicking on it. You can also use this menu for updating a previously installed library or to change between versions of a library:
  1. After the library is installed, you will see the following screen:

Note

As an exercise, do the same for WiFiManager and PubSubClient libraries.

Library is not in the repository

Sometimes the library you need may not exist in the official repository but you may have found it on http://github.com as a ZIP archive.

To install the library, in this case, you need to perform the following steps:

  1. Download the ZIP file and install it manually. For this, go to Sketch|Include Library|Add .ZIP Library... and select the downloaded library from your disk and press Open.
  2. Include an existing library.
  3. To include an existing library, go to Sketch | Include Library and select the library you want to include in your sketch.
  4. The .h file will be added to your sketch and now you have access to the function a in this library to use them in your own program:
Previous PageNext Page
You have been reading a chapter from
ESP8266 Home Automation Projects
Published in: Nov 2017Publisher: PacktISBN-13: 9781787282629
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Catalin Batrinu

Catalin Batrinu graduated from the Politehnica University of Bucharest in Electronics, Telecommunications, and Information Technology. He has been working as a software developer in telecommunications for the past 16 years. He has worked with old protocols and the latest network protocols and technologies, so he has experienced all transformations in the telecommunication industry. He has implemented many telecommunications protocols, from access adaptations and backbone switches to high-capacity, carrier-grade switches on various hardware platforms from Wintegra and Broadcom. Internet of Things came as a natural evolution for him and now he collaborates with different companies to construct the world of tomorrow that will make our life more comfortable and secure. Using the ESP8266, he has prototyped devices such as irrigation controllers, smart sockets, window shutters, Digital Addressable Lighting Controls, and environment controls, all of them controlled directly from a mobile application over the cloud. An MQTT broker with bridging and a WebSockets server was even developed for the ESP8266. Soon, all those devices will be part of our daily life, so we will all enjoy their functionality.
Read more about Catalin Batrinu