Internet of Things with Arduino Blueprints
()
About this ebook
Read more from Pradeeka Seneviratne
Raspberry Pi 3 Projects for Java Programmers Rating: 0 out of 5 stars0 ratingsBeginning e-Textile Development: Prototyping e-Textiles with Wearic Smart Textiles Kit and the BBC micro:bit Rating: 0 out of 5 stars0 ratingsBeginning LoRa Radio Networks with Arduino: Build Long Range, Low Power Wireless IoT Networks Rating: 0 out of 5 stars0 ratingsBeginning BBC micro:bit: A Practical Introduction to micro:bit Development Rating: 0 out of 5 stars0 ratingsBBC micro:bit Recipes: Learn Programming with Microsoft MakeCode Blocks Rating: 0 out of 5 stars0 ratings
Related to Internet of Things with Arduino Blueprints
Related ebooks
Arduino by Example Rating: 4 out of 5 stars4/5Arduino for Secret Agents Rating: 4 out of 5 stars4/5Python Programming for Arduino Rating: 5 out of 5 stars5/5Arduino Electronics Blueprints Rating: 4 out of 5 stars4/5Building Wireless Sensor Networks Using Arduino Rating: 4 out of 5 stars4/5Arduino Networking Rating: 4 out of 5 stars4/5Arduino Android Blueprints Rating: 0 out of 5 stars0 ratingsLearn Arduino Prototyping in 10 days Rating: 0 out of 5 stars0 ratingsRaspberry Pi Computer Architecture Essentials Rating: 0 out of 5 stars0 ratingsLearning C for Arduino Rating: 0 out of 5 stars0 ratingsArduino Home Automation Projects Rating: 3 out of 5 stars3/5Arduino Essentials Rating: 5 out of 5 stars5/5Raspberry Pi Robotic Projects - Third Edition Rating: 0 out of 5 stars0 ratingsArduino Robotic Projects Rating: 4 out of 5 stars4/5Programming Arduino with LabVIEW Rating: 3 out of 5 stars3/5Arduino: The ultimate guide to Arduino, including projects, programming tips & tricks, and much more! Rating: 0 out of 5 stars0 ratingsInternet of Things with Python Rating: 0 out of 5 stars0 ratingsRaspberry Pi Home Automation with Arduino - Second Edition Rating: 0 out of 5 stars0 ratingsArduino: Building LED and Espionage Projects Rating: 0 out of 5 stars0 ratingsBuilding Smart Homes with Raspberry Pi Zero Rating: 0 out of 5 stars0 ratingsInternet of Things with Intel Galileo Rating: 0 out of 5 stars0 ratingsInternet of Things with ESP8266 Rating: 5 out of 5 stars5/5Smart Internet of Things Projects Rating: 4 out of 5 stars4/5Raspberry Pi Server Essentials Rating: 0 out of 5 stars0 ratingsGetting Started with Raspberry Pi Zero Rating: 5 out of 5 stars5/5BeagleBone By Example Rating: 0 out of 5 stars0 ratingsArduino Programming Projects: Learn how to build cool, fun, and easy Arduino Projects (English Edition) Rating: 0 out of 5 stars0 ratingsRaspberry Pi LED Blueprints Rating: 0 out of 5 stars0 ratingsRaspberry Pi Android Projects Rating: 0 out of 5 stars0 ratings
Hardware For You
Dancing with Qubits: How quantum computing works and how it can change the world Rating: 5 out of 5 stars5/5CompTIA A+ Complete Review Guide: Exam Core 1 220-1001 and Exam Core 2 220-1002 Rating: 5 out of 5 stars5/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5CompTIA A+ Complete Review Guide: Core 1 Exam 220-1101 and Core 2 Exam 220-1102 Rating: 5 out of 5 stars5/5Creative Selection: Inside Apple's Design Process During the Golden Age of Steve Jobs Rating: 5 out of 5 stars5/5Essential iPad iOS 12 Edition: The Illustrated Guide to Using your iPad Rating: 5 out of 5 stars5/5Amazon Web Services (AWS) Interview Questions and Answers Rating: 5 out of 5 stars5/5Computer Science: A Concise Introduction Rating: 4 out of 5 stars4/5Chip War: The Fight for the World's Most Critical Technology Rating: 4 out of 5 stars4/5Build Your Own PC Do-It-Yourself For Dummies Rating: 4 out of 5 stars4/5Mastering ChatGPT Rating: 0 out of 5 stars0 ratingsiPhone For Seniors For Dummies: Updated for iPhone 12 models and iOS 14 Rating: 4 out of 5 stars4/5Raspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsComputer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Raspberry Pi for Secret Agents - Second Edition Rating: 3 out of 5 stars3/5CompTIA A+ Complete Review Guide: Exams 220-901 and 220-902 Rating: 5 out of 5 stars5/53D Printing For Dummies Rating: 4 out of 5 stars4/5iPhone Photography: A Ridiculously Simple Guide To Taking Photos With Your iPhone Rating: 0 out of 5 stars0 ratingsDebugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems Rating: 4 out of 5 stars4/5Essential iPhone iOS 12 Edition: The Illustrated Guide to Using iPhone Rating: 0 out of 5 stars0 ratingsMacBook For Dummies Rating: 4 out of 5 stars4/5Apple Watch Series 4: Your Ultimate Guide to Using the Apple Watch Like A Pro Rating: 5 out of 5 stars5/5Evernote Essentials Guide (Boxed Set): Evernote Guide For Beginners for Organizing Your Life Rating: 3 out of 5 stars3/5Macs All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsiPhone X Hacks, Tips and Tricks: Discover 101 Awesome Tips and Tricks for iPhone XS, XS Max and iPhone X Rating: 3 out of 5 stars3/5Fitbit For Dummies Rating: 0 out of 5 stars0 ratingsThe Ridiculously Simple Guide To iPad Air (2020 Model): Getting the Most Out of the Latest Generation of iPad Air Rating: 0 out of 5 stars0 ratingsiPhone 14 Pro Max User Guide for Beginners and Seniors Rating: 0 out of 5 stars0 ratings
Reviews for Internet of Things with Arduino Blueprints
0 ratings0 reviews
Book preview
Internet of Things with Arduino Blueprints - Pradeeka Seneviratne
Table of Contents
Internet of Things with Arduino Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Internet-Controlled PowerSwitch
Getting started
Hardware and software requirements
Arduino Ethernet Shield
The Arduino Ethernet board
Connecting Arduino Ethernet Shield to the Internet
Testing your Arduino Ethernet Shield
Selecting a PowerSwitch Tail
PN PSSRKT-240
PN80135
Wiring PowerSwitch Tail with Arduino Ethernet Shield
Turning PowerSwitch Tail into a simple web server
What is a web server?
A step-by-step process for building a web-based control panel
Handling client requests by HTTP GET
Sensing the availability of mains electricity
Testing the mains electricity sensor
Building a user-friendly web user interface
Adding a Cascade Style Sheet to the web user interface
Finding the MAC address and obtaining a valid IP address
Finding the MAC address
Obtaining an IP address
Assigning a static IP address
Obtaining an IP address using DHCP
Summary
2. Wi-Fi Signal Strength Reader and Haptic Feedback
Prerequisites
Arduino WiFi Shield
Firmware upgrading
Stacking the WiFi Shield with Arduino
Hacking an Arduino earlier than REV3
Knowing more about connections
Fixing the Arduino WiFi library
Connecting your Arduino to a Wi-Fi network
Wi-Fi signal strength and RSSI
Reading the Wi-Fi signal strength
Haptic feedback and haptic motors
Getting started with the Adafruit DRV2605 haptic controller
Selecting a correct vibrator
Connecting a haptic controller to Arduino WiFi Shield
Soldering a vibrator to the haptic controller breakout board
Downloading the Adafruit DRV2605 library
Making vibration effects for RSSI
Implementing a simple web server
Reading the signal strength over Wi-Fi
Summary
3. Internet-Connected Smart Water Meter
Prerequisites
Water flow sensors
Wiring the water flow sensor with Arduino
Reading pulses
Rising edge and falling edge
Reading and counting pulses with Arduino
Calculating the water flow rate
Calculating the water flow volume
Adding an LCD screen to the water meter
Converting your water meter to a web server
A little bit about plumbing
Summary
4. Arduino Security Camera with Motion Detection
Prerequisites
Getting started with TTL Serial Camera
Wiring the TTL Serial Camera for image capturing
Wiring the TTL Serial Camera for video capturing
Testing NTSC video stream with video screen
Connecting the TTL Serial Camera with Arduino and Ethernet Shield
Image capturing with Arduino
The Software Serial library
How the image capture works
Uploading images to Flickr
Creating a Flickr account
Creating a Temboo account
Creating your first Choreo
Initializing OAuth
Finalizing OAuth
Generating the photo upload sketch
Connecting the camera output with Temboo
Motion detection
Summary
5. Solar Panel Voltage Logging with NearBus Cloud Connector and Xively
Connecting a solar cell with the Arduino Ethernet board
Building a voltage divider
Building the circuit with Arduino
Setting up a NearBus account
Defining a new device
Examining the device lists
Downloading the NearBus agent
Creating and configuring a Xively account
Configuring the NearBus connected device for Xively
Developing a web page to display the real-time voltage values
Displaying data on a web page
Summary
6. GPS Location Tracker with Temboo, Twilio, and Google Maps
Hardware and software requirements
Hardware requirements
Software requirements
Getting started with the Arduino GPS shield
Connecting the Arduino GPS shield with the Arduino Ethernet board
Testing the GPS shield
Displaying the current location on Google Maps
Getting started with Twilio
Creating a Twilio account
Finding Twilio LIVE API credentials
Finding Twilio test API credentials
Get your Twilio number
Creating Twilio Choreo with Temboo
Sending an SMS with Twilio API
Send a GPS location data using Temboo
Summary
7. Tweet-a-Light – Twitter-Enabled Electric Light
Hardware and software requirements
Hardware
Software
Getting started with Python
Installing Python on Windows
Setting environment variables for Python
Installing the setuptools utility on Python
Installing the pip utility on Python
Opening the Python interpreter
Installing the Tweepy library
Installing pySerial
Creating a Twitter app and obtaining API keys
Writing a Python script to read Twitter tweets
Reading the serial data using Arduino
Connecting the PowerSwitch Tail with Arduino
Summary
8. Controlling Infrared Devices Using IR Remote
Building an Arduino infrared recorder and remote
Hardware
Software
Building the IR receiver module
Capturing IR commands in hexadecimal
Capturing IR commands in the raw format
Building the IR sender module
Controlling through the LAN
Adding an IR socket to non-IR enabled devices
Summary
Index
Internet of Things with Arduino Blueprints
Internet of Things with Arduino Blueprints
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2015
Production reference: 1201015
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-548-6
www.packtpub.com
Credits
Author
Pradeeka Seneviratne
Reviewers
Francesco Azzola
Paul Deng
Charalampos Doukas
Paul Massey
Commissioning Editor
Nadeem Bagban
Acquisition Editor
Vivek Anantharaman
Content Development Editor
Arwa Manasawala
Technical Editor
Vivek Arora
Copy Editors
Imon Biswas
Angad Singh
Project Coordinator
Shweta H Birwatkar
Proofreader
Safis Editing
Indexer
Tejal Soni
Graphics
Jason Monteiro
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat
About the Author
Pradeeka Seneviratne is a software engineer with over 10 years of experience in computer programming and systems designing. He loves programming embedded systems such as Arduino and Raspberry Pi. Pradeeka started learning about electronics when he was at primary college by reading and testing various electronic projects found in newspapers, magazines, and books.
Pradeeka is currently a full-time software engineer who works with highly scalable technologies. Previously, he worked as a software engineer for several IT infrastructure and technology servicing companies, and he was also a teacher for information technology and Arduino development.
He researches how to make Arduino-based unmanned aerial vehicles and Raspberry Pi-based security cameras.
About the Reviewers
Francesco Azzola is an electronics engineer with more than 15 years of experience in the architecture and development of JEE applications. He has a deep knowledge of mobile messaging, smart cards, and mobile applications. He enjoys building Android apps and experimenting with the IoT ecosystem using Arduino and Android. He is a Sun Certified Enterprise Architect (SCEA), SCWCD, SCJP, Prince2 (Foundation), and VCA-DCV. In his spare time, he runs a blog about Android and IoT (http://www.survivingwithandroid.com/).
Paul Deng is a senior software engineer with over 8 years of experience in IoT app design and development. He has been working with the Arduino platform since its early days in 2008.
His past experience involves end-to-end IoT app design and development, including embedded devices, large-scale machine learning, and cloud and web apps. Paul holds software algorithm patents and was a finalist of the Shell Australian Innovation Challenge 2011. He has authored several publications on IoT and sensor networks.
Paul is an open source contributor and active blogger. He is also an AWS Certified Solutions Architect and Developer with a master's degree in distributed computing from the University of Melbourne.
He lives in Melbourne, Australia with his wife, Cindy, and son, Leon. You can visit his website at http://dengpeng.de/ to see what he is currently exploring and to learn more about him.
Paul Massey has worked in computer programming for over 20 years, 11 years of which have been as a CEO of Scriptwerx (http://ghost.scriptwerx.io/). He is an expert in JavaScript and mobile technologies, as well as working with the Arduino platform (and similar platforms). He has worked on this platform for a number of years, creating hardware and software projects for Internet of Things, audio-visual, and automotive technologies.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
Arduino is a small single-chip computer board that can be used for a wide variety of creative hardware projects. The hardware consists of a simple microcontroller, board, and chipset. It comes with a Java-based IDE that allows creators to program the board. Arduino is the ideal open hardware platform to experiment with the world of Internet of Things. The credit card-sized Arduino board can be used via the Internet to make useful and interactive Internet of Things (IoT) projects.
Internet of Things with Arduino Blueprints is a project-based book that begins with projects based on IoT and cloud computing