Book Image

Arduino Networking

By : Marco Schwartz
Book Image

Arduino Networking

By: Marco Schwartz

Overview of this book

Table of Contents (13 chapters)

Logging data in a spreadsheet


After finishing the configuration of our device on the Temboo website, we downloaded a bunch of files from Temboo. However, the Arduino file that was downloaded is for a generic sensor. In this section, we are going to adapt this file for our own needs and see the details of how the code works.

Note

You will need to insert your own TembooAccount.h file in the same folder as the Arduino file so that the code can work.

The main Arduino sketch for this section starts by including all the libraries that are required for the project to work with Temboo. Note that we will also insert the DHT library. Add the following libraries in the code:

#include <SPI.h>
#include <Dhcp.h>
#include <Dns.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <Temboo.h>
#include "TembooAccount.h"
#include "DHT.h"

We also define the pin on which the DHT sensor is connected and the type of the sensor:

#define DHTPIN 7
#define DHTTYPEDHT11

Then, we...