Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Internet of Things with Arduino Cookbook
Internet of Things with Arduino Cookbook

Internet of Things with Arduino Cookbook: Build exciting IoT projects using the Arduino platform

eBook
€15.99 €23.99
Paperback
€29.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Internet of Things with Arduino Cookbook

Chapter 2. Cloud Data Monitoring

In this chapter, we will cover:

  • Internet of Things platforms for Arduino
  • Connecting sensors to your Arduino board
  • Posting the sensor data online
  • Retrieving your online data
  • Monitoring sensor data from a cloud dashboard
  • Monitoring several Arduino boards at once
  • Troubleshooting issues with cloud data monitoring

Introduction

One of the most important things you can do with an Internet of Things project is to send data online, so it can be stored, retrieved later, and plotted inside a nice dashboard. Of course, it needs to be accessible from any web browser or application in the world.

In this chapter, this is exactly what we are going to do with Arduino. We are going to use an Arduino board to log sensor data online, and then we'll see how to exploit this data. We are first going to get an overview of what options are available when you want to log data online from an Arduino project. Then, we are going to connect sensors to the Arduino board, and log this data online. Finally, we'll see how to access this data, plot it, and also visualize data coming from several boards at once.

Internet of Things platforms for Arduino

In the first recipe of this chapter, we are going to see the different platforms that are available for us, if we want to store data online from an Arduino project. We'll see what are the strengths and the weaknesses of each platform, so we can make a choice for the rest of this chapter.

Available platforms

The first platform that I wanted to mention here is called Dweet.io. You can learn more about it at:

https://dweet.io/

Available platforms

Dweet.io is basically a simple API that can be called from any web browser or application, and it is so simple to use that even a human can use it without problems! It's really easy to store data there from an Arduino project, and then to retrieve this data using other applications.

The next platform I wanted to mention here is Xively. This is the main page of Xively:

https://xively.com/

Available platforms

Xively is a complete IoT platform, which is more dedicated to the business world than Dweet.io, for example. It includes more functions...

Connecting sensors to your Arduino board

In this recipe, we are going to build the project that we will use for the rest of this chapter. We basically want to connect sensors to the Arduino MKR1000 board that will continuously measure data. As an example here, we are going to connect a photocell (that we already used in the first chapter of this book), as well as a DHT11 temperature and humidity sensor.

Getting ready

Let's first see what additional components we will need for this project:

You will also need to install the Adafruit DHT library that you can find inside the Arduino board manager.

We are now going to assemble the project. First, place the resistor in series with the photocell on the breadboard, next to the MKR1000 board.

Now, connect the other end of the resistor to GND on the MKR1000 board, and the other end of the...

Posting the sensor data online

Using the Arduino MKR1000 board and the sensors that we connected to it, we are finally going to log data online, using the Dweet.io service.

Getting ready

For this recipe, you simply need to have the previous recipe up and running, so make sure you have all the sensors connected to your board, and that you have tested them with the test sketch.

You should already have it by now, but make sure that you have the Arduino WiFi101 library installed inside the Arduino IDE.

How to do it...

We are now going to configure the board so it sends the measurements from the sensor to Dweet.io at regular intervals. As this sketch is quite similar to what we already saw in previous chapters, I will only highlight the most important parts of the code here:

  1. First, we need to define the libraries that we are going to use in this project:
    #include <SPI.h>
    #include <WiFi101.h>
    #include "DHT.h"
  2. Then, we need to define a name for our thing on Dweet.io, which is the...

Retrieving your online data

Now that we have stored measurement data in the previous recipe, we are now going to learn how to retrieve it and possibly use it inside applications.

Getting ready

For this recipe, you need to have some data stored on the Dweet.io server. For that, please follow the previous recipe if that's not done yet.

How to do it...

Let's suppose that you have data stored for a device called "mymkr1000" on the Dweet.io server. You can easily access the latest data that was stored on the server by typing the following command inside any web browser:

https://dweet.io/get/latest/dweet/for/mymkr1000

This will be the result:

{  
   "this":"succeeded",
   "by":"getting",
   "the":"dweets",
   "with":[  
      {  
         "thing":"mymkr1000",
         "created":"2016-05-06T09:35:31.110Z",
         "content":{  
            "temperature&quot...

Introduction


One of the most important things you can do with an Internet of Things project is to send data online, so it can be stored, retrieved later, and plotted inside a nice dashboard. Of course, it needs to be accessible from any web browser or application in the world.

In this chapter, this is exactly what we are going to do with Arduino. We are going to use an Arduino board to log sensor data online, and then we'll see how to exploit this data. We are first going to get an overview of what options are available when you want to log data online from an Arduino project. Then, we are going to connect sensors to the Arduino board, and log this data online. Finally, we'll see how to access this data, plot it, and also visualize data coming from several boards at once.

Internet of Things platforms for Arduino


In the first recipe of this chapter, we are going to see the different platforms that are available for us, if we want to store data online from an Arduino project. We'll see what are the strengths and the weaknesses of each platform, so we can make a choice for the rest of this chapter.

Available platforms

The first platform that I wanted to mention here is called Dweet.io. You can learn more about it at:

https://dweet.io/

Dweet.io is basically a simple API that can be called from any web browser or application, and it is so simple to use that even a human can use it without problems! It's really easy to store data there from an Arduino project, and then to retrieve this data using other applications.

The next platform I wanted to mention here is Xively. This is the main page of Xively:

https://xively.com/

Xively is a complete IoT platform, which is more dedicated to the business world than Dweet.io, for example. It includes more functions than just...

Connecting sensors to your Arduino board


In this recipe, we are going to build the project that we will use for the rest of this chapter. We basically want to connect sensors to the Arduino MKR1000 board that will continuously measure data. As an example here, we are going to connect a photocell (that we already used in the first chapter of this book), as well as a DHT11 temperature and humidity sensor.

Getting ready

Let's first see what additional components we will need for this project:

You will also need to install the Adafruit DHT library that you can find inside the Arduino board manager.

We are now going to assemble the project. First, place the resistor in series with the photocell on the breadboard, next to the MKR1000 board.

Now, connect the other end of the resistor to GND on the MKR1000 board, and the other end of the photocell...

Posting the sensor data online


Using the Arduino MKR1000 board and the sensors that we connected to it, we are finally going to log data online, using the Dweet.io service.

Getting ready

For this recipe, you simply need to have the previous recipe up and running, so make sure you have all the sensors connected to your board, and that you have tested them with the test sketch.

You should already have it by now, but make sure that you have the Arduino WiFi101 library installed inside the Arduino IDE.

How to do it...

We are now going to configure the board so it sends the measurements from the sensor to Dweet.io at regular intervals. As this sketch is quite similar to what we already saw in previous chapters, I will only highlight the most important parts of the code here:

  1. First, we need to define the libraries that we are going to use in this project:

    #include <SPI.h>
    #include <WiFi101.h>
    #include "DHT.h"
  2. Then, we need to define a name for our thing on Dweet.io, which is the name we will...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • This book offers key solutions and advice to address the hiccups faced when working on Arduino-based IoT projects in the real world
  • Take your existing skills and capabilities to the next level by building challenging IoT applications with ease.
  • Be the tech disruptor you always wanted to be with key recipes that help you solve Arduino IoT related problems smarter and faster.
  • Put IoT to work through recipes on building Arduino-based devices that take control of your home, health, and life!

Description

Arduino is a powerful and very versatile platform used by millions of people around the world to create DIY electronics projects. It can be connected to a wide variety of sensors and other components, making it the ideal platform to build amazing Internet of Things (IoT) projects on—the next wave in the era of computing. This book takes a recipe-based approach, giving you precise examples on how to build IoT projects of all types using the Arduino platform. You will come across projects from several fields, including the popular robotics and home automation domains. Along with being introduced to several forms of interactions within IoT, including projects that directly interact with well-known web services such as Twitter, Facebook, and Dropbox we will also focus on Machine-to-Machine (M2M) interactions, where Arduino projects interact without any human intervention. You will learn to build a few quick and easy-to-make fun projects that will really expand your horizons in the world of IoT and Arduino. Each chapter ends with a troubleshooting recipe that will help you overcome any problems faced while building these projects. By the end of this book, you will not only know how to build these projects, but also have the skills necessary to build your own IoT projects in the future.

Who is this book for?

This book is primarily for tech enthusiasts and early IoT adopters who would like to make the most of IoT and address the challenges encountered while developing IoT-based applications with Arduino. This book is also good for developers with basic electronics knowledge who need help to successfully build Arduino projects.

What you will learn

  • Monitor several Arduino boards simultaneously
  • Tweet sensor data directly from your Arduino board
  • Post updates on your Facebook wall directly from your Arduino board
  • Create an automated access control with a fingerprint sensor
  • Control your entire home from a single dashboard
  • Make a GPS tracker that you can track in Google Maps
  • Build a live camera that streams directly from your robot

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 30, 2016
Length: 188 pages
Edition : 1st
Language : English
ISBN-13 : 9781785883316
Category :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Sep 30, 2016
Length: 188 pages
Edition : 1st
Language : English
ISBN-13 : 9781785883316
Category :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.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
€189.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
€264.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 115.97
Arduino: Building exciting LED based projects and espionage devices
€52.99
Smart Internet of Things Projects
€32.99
Internet of Things with Arduino Cookbook
€29.99
Total 115.97 Stars icon
Banner background image

Table of Contents

8 Chapters
1. Connecting an Arduino to the Web Chevron down icon Chevron up icon
2. Cloud Data Monitoring Chevron down icon Chevron up icon
3. Interacting with Web Services Chevron down icon Chevron up icon
4. Machine-to-Machine Interactions Chevron down icon Chevron up icon
5. Home Automation Projects Chevron down icon Chevron up icon
6. Fun Internet of Things Projects Chevron down icon Chevron up icon
7. Mobile Robot Applications 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 Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Martha Cuellar Nov 12, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Llego en tiempo y forma en buenas condiciones
Amazon Verified review Amazon
keith wootton Jan 18, 2018
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Was a gift. Very well liked.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.