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
R$80 R$173.99
Paperback
R$217.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Brazil

Standard delivery 10 - 13 business days

R$63.95

Premium delivery 3 - 6 business days

R$203.95
(Includes tracking information)

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 : 9781785286582
Category :
Concepts :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Brazil

Standard delivery 10 - 13 business days

R$63.95

Premium delivery 3 - 6 business days

R$203.95
(Includes tracking information)

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 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
R$500 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 R$25 each
Feature tick icon Exclusive print discounts
R$800 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 R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 853.97
Arduino: Building exciting LED based projects and espionage devices
R$389.99
Smart Internet of Things Projects
R$245.99
Internet of Things with Arduino Cookbook
R$217.99
Total R$ 853.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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact [email protected] with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at [email protected] using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on [email protected] with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on [email protected] within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on [email protected] who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on [email protected] within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela