Building Arduino Projects for the Internet of Things by Adeel Javed

Building Arduino Projects for the Internet of Things by Adeel Javed

Author:Adeel Javed
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


Control LED

Standard functions

External Libraries

The first section of code includes all the external libraries required to run the code. This sketch has two main dependencies—for Internet connectivity, you need to include the <WiFi.h> (assuming you are using a WiFi shield) and for the MQTT broker communication, you need to include <PubSubClient.h>.

Listing 6-12 provides the first section of the code with all the required libraries.

#include <SPI.h>

#include <WiFi.h>

#include <PubSubClient.h>

Listing 6-12.Code for Including External Dependencies



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.