Learning IoT with Particle Photon and Electron
()
About this ebook
Develop applications on one of the most popular platforms for IoT using Particle Photon and Electron with this fast-paced guide
About This Book- Get an introduction to IoT architecture, command-line build tools and applications of IoT devices and sensors
- Design and develop connected IoT applications using Particle Photon and Electron in a step-by-step manner, gaining an entry point into the field of IoT
- Get tips on troubleshooting IoT applications
This book is for developers, IoT enthusiasts and hobbyists who want to enhance their knowledge of IoT machine-to-machine architecture using Particle Photon and Electron, and implement cloud-based IoT projects.
What You Will Learn- Setup the Particle Photon and Electron on the cloud using the command-line tools
- Build and deploy applications on the Photon and Electron using the Web-based IDE
- Setup a local cloud server to interact with Particle Photon and Electron
- Connect various components and sensors to Particle Photon and Electron
- Tinker with the existing firmware and deploy a custom firmware on the Photon and Electron
- Setup communication between two or more Particle Photon and Electron
- Debug and troubleshoot Particle Photon and Electron projects
- Use webhooks to communicate with various third-party server applications
IoT is basically the network of physical devices, vehicles, buildings and other items—embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.. The number of connected devices is growing rapidly and will continue to do so over years to come. By 2020, there will be more than 20 billion connected devices and the ability to program such devices will be in high demand. Particle provides prototyping boards for IoT that are easy to program and deploy. Most importantly, the boards provided by Particle can be connected to the Internet very easily as they include Wi-Fi or a GSM module.
Starting with the basics of programming Particle Photon and Electron, this book will take you through setting up your local servers and running custom firmware, to using the Photon and Electron to program autonomous cars. This book also covers in brief a basic architecture and design of IoT applications. It gives you an overview of the IoT stack. You will also get information on how to debug and troubleshoot Particle Photon and Electron and set up your own debugging framework for any IoT board. Finally, you'll tinker with the firmware of the Photon and Electron by modifying the existing firmware and deploying them to your boards.
By the end of this book, you should have a fairly good understanding of the IoT ecosystem and you should be able to build standalone projects using your own local server or the Particle Cloud Server.
Style and approachThis project-based guide contains easy-to-follow steps to program Particle Photon and Electron. You will learn to build connected applications with the help of projects of increasing complexity, and with each project, a new concept in IoT is taught.
Related to Learning IoT with Particle Photon and Electron
Related ebooks
Learning IoT with Particle Photon and Electron Rating: 0 out of 5 stars0 ratingsPractical Internet of Things with JavaScript: Build standalone exciting IoT projects with Raspberry Pi 3 and JavaScript (ES5/ES6) Rating: 0 out of 5 stars0 ratingsIntelligent IoT Projects in 7 Days: Build exciting projects using smart devices Rating: 0 out of 5 stars0 ratingsIntel Edison Projects Rating: 0 out of 5 stars0 ratingsAzure IoT Development Cookbook Rating: 0 out of 5 stars0 ratingsHands-On Artificial Intelligence for IoT: Expert machine learning and deep learning techniques for developing smarter IoT systems Rating: 0 out of 5 stars0 ratingsBuilding Mobile Applications Using Kendo UI Mobile and ASP.NET Web API Rating: 0 out of 5 stars0 ratingsMastering Python Networking: Your one stop solution to using Python for network automation, DevOps, and SDN Rating: 0 out of 5 stars0 ratingsAnalytics for the Internet of Things (IoT) Rating: 0 out of 5 stars0 ratingsMastering Arduino: A project-based approach to electronics, circuits, and programming Rating: 0 out of 5 stars0 ratingsNetwork Science with Python: Explore the networks around us using network science, social network analysis, and machine learning Rating: 0 out of 5 stars0 ratingsDeep Learning for Computer Vision: Expert techniques to train advanced neural networks using TensorFlow and Keras Rating: 0 out of 5 stars0 ratingsProgramming the BeagleBone Rating: 0 out of 5 stars0 ratingsNode.js High Performance Rating: 0 out of 5 stars0 ratingsLearning Single-page Web Application Development Rating: 0 out of 5 stars0 ratingsWeb App Testing Using Knockout.JS Rating: 0 out of 5 stars0 ratingsMicroservices with Clojure: Develop event-driven, scalable, and reactive microservices with real-time monitoring Rating: 0 out of 5 stars0 ratingsMachine Learning for Mobile: Practical guide to building intelligent mobile applications powered by machine learning Rating: 0 out of 5 stars0 ratingsHands-On Microservices with C# 8 and .NET Core 3: Refactor your monolith architecture into microservices using Azure, 3rd Edition Rating: 0 out of 5 stars0 ratingsMachine Learning Projects for Mobile Applications: Build Android and iOS applications using TensorFlow Lite and Core ML Rating: 0 out of 5 stars0 ratingsProgramming Arduino with LabVIEW Rating: 3 out of 5 stars3/5Hands-On Edge Analytics with Azure IoT: Design and develop IoT applications with edge analytical solutions including Azure IoT Edge Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5No Place to Hide: Edward Snowden, the NSA, and the U.S. Surveillance State Rating: 4 out of 5 stars4/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Wireless Hacking 101 Rating: 5 out of 5 stars5/5How to Be Invisible: Protect Your Home, Your Children, Your Assets, and Your Life Rating: 4 out of 5 stars4/5How to Disappear and Live Off the Grid: A CIA Insider's Guide Rating: 0 out of 5 stars0 ratingsCoding For Dummies Rating: 5 out of 5 stars5/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 4 out of 5 stars4/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5Tor and the Dark Art of Anonymity Rating: 5 out of 5 stars5/5How To Start A Profitable Authority Blog In Under One Hour Rating: 5 out of 5 stars5/5Get Rich or Lie Trying: Ambition and Deceit in the New Influencer Economy Rating: 0 out of 5 stars0 ratingsThe Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5Six Figure Blogging Blueprint Rating: 5 out of 5 stars5/5Beginner's Guide To Starting An Etsy Print-On-Demand Shop Rating: 0 out of 5 stars0 ratingsSurveillance and Surveillance Detection: A CIA Insider's Guide Rating: 3 out of 5 stars3/5Content Chemistry: The Illustrated Handbook for Content Marketing Rating: 5 out of 5 stars5/5Cybersecurity For Dummies Rating: 5 out of 5 stars5/5Cybersecurity All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsThe Gothic Novel Collection Rating: 5 out of 5 stars5/5The Beginner's Affiliate Marketing Blueprint Rating: 4 out of 5 stars4/5More Porn - Faster!: 50 Tips & Tools for Faster and More Efficient Porn Browsing Rating: 3 out of 5 stars3/5Podcasting For Dummies Rating: 4 out of 5 stars4/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Duly Noted: Extend Your Mind through Connected Notes Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5
Reviews for Learning IoT with Particle Photon and Electron
0 ratings0 reviews
Book preview
Learning IoT with Particle Photon and Electron - Rashid Khan
Table of Contents
Learning IoT with Particle Photon and Electron
Credits
About the Authors
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the color images of this book
Errata
Piracy
Questions
1. Introducing IoT with Particle Photon and Electron
Evolution of the IoT
Why the IoT has become a household word now
Hardware and software in the IoT ecosystem
Essential terminology
Network protocols
Market survey of IoT development boards and cloud services
IoT development boards
Cloud services (PaaS, BaaS, M2M)
What is Particle?
The journey of Particle
Why Particle?
What does Particle offer?
Photon, Electron, and Core
Spark Core
Particle Photon
Particle Electron
Comparison
Summary
2. Fire Up Your Kit
Essentials of FreeRTOS and hardware resources
Flow diagram for the Twitter project
Getting the Photon online
Setting up the Photon or Core
Software and hardware requirements
Software setup
Connecting Particle Photon or Core
The Web IDE
Twitter and e-mail interaction project
Setting up a Twitter developer account
Sending web requests using Particle webhooks
Creating a webhook
Listing and deleting webhooks
Putting it all together
Setting up the Twitter and e-mail webhook
How to sense motion?
Sensing button presses - programming the buttons
Tweets and e-mail
Troubleshooting
Summary
3. P2P and Local Server
Client-server versus P2P networks
Traditional client-server architecture
Peer-to-peer network architecture
Client-server versus P2P
Advantages and disadvantages of P2P networking
Setting up a P2P network for Particle devices
Flash the VoodooSpark firmware
Connect the Particle board with VoodooSpark
Controlling your Particle board using the keyboard
Local server setup
Advantages and disadvantages of Particle local server
Installing Particle server on a local machine
Configuring the local server
Alternate protocols for IoT
MQTT
CoAP
Summary
4. Connecting the Sensors
Overview of the project
Hardware components and setup
RFID reader module RC522-RFID and RFID tags
PIR motion sensor
Data flow diagrams
Communication between the Photons
Sample code
Photon with the RFID reader
Photon with the motion sensor
Data storage on the cloud
Cloud data analysis and SMS notification
Troubleshooting
Summary
5. Of Cars and Controllers
Building the model car - hardware components
Wheels
L293D motor driver
65 RPM DC Right Angled motor
Chassis
Power supply and Li-Po battery
Breadboard and jumper wires
Building the model car - prerequisites
Putting it all together and controlling the car
The code
Running the program and controlling the car
Moving the car with gestures
How it works
The code
Programming the car with the Electron
Putting it all together (again)
The code
Troubleshooting
Summary
6. Hacking the Firmware
What is firmware?
A bit of history
Obtaining and flashing firmware
Obtaining firmware
Obtaining firmware by direct download
Obtaining firmware by building from source
ARM GCC
Make
Git
Getting the firmware source code
Compiling the code
Burning firmware onto the device
Burning firmware using the OTA method
Burning firmware using Particle-CLI
Burning firmware using the DFU-Util method
Installing DFU-Util
Flashing firmware
Custom firmware
Summary
Learning IoT with Particle Photon and Electron
Learning IoT with Particle Photon and Electron
Copyright © 2016 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 authors, 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: September 2016
Production reference: 1070916
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78588-529-7
www.packtpub.com
Credits
About the Authors
Rashid Khan is a programmer living in Bangalore. He is one of the founders of Yellow Messenger, a company that specializes in building bots for commerce. Prior to founding Yellow Messenger, he worked at EdgeVerve Systems, where he built backend systems to support IoT devices. He is an open source enthusiast and loves to experiment with new technologies. He is involved with a number of open source organizations, such as GNOME, Mono, Tomboy Notes, and Banshee and has built a Django (Python) library for Apache Spark called Django-LibSpark.
His interests lie in the field of Artificial Intelligence and interfacing software with real-world objects. Apart from programming, he loves to cycle and play tennis.
I am really thankful to my mother and father for providing the motivation and guidance to help me push myself constantly. My co-founders at Yellow Messenger, Anik, Raghu, and Kishore, provided constant support to experiment with new ideas for this book, and I would like to extend my gratitude for that. I would like to thank Rajeshwari Ganesan, my manager at EdgeVerve Systems, for giving me the opportunity to author this book. I would like to extend my gratitude to Ajith and Kajari, my coauthors, without whom this book would not be possible. This book would be incomplete without the guidance and mentorship of my friends and co-workers at EdgeVerve. I am extremely thankful to Chetan, who helped a lot with the sensors and data, and Nelly (Jeonghyun Kang), who helped with the firmware and testing out the initial projects.
Kajari Ghoshdastidar got her PhD in wireless sensor networks in 2009 and has been active in IoT-related hobby project work since then. She has worked in the software industry for the last 6 years as a technology architect, software developer, and a computer scientist. She is a technology geek, takes part in hackathons, and is always exploring new technologies and electronic gadgets.
She is currently part of the systems engineering team at EdgeVerve, working as a computer scientist.
First of all, I would like to thank Rajeshwari Ganesan, my mentor and manager at Edgeverve, for inspiring me to pen this book and closely guiding me all the way, and Rashid and Ajith for being the most awesome coauthors I could wish for. This book wouldn’t be complete without the support of my colleagues at Edgeverve, Chetan Kumar Velumurugan, who helped us a lot with his deep knowledge of sensors and accessories, and Nelly (Jeonghyun Kang), who helped with setting up and testing out the initial projects.
Ajith Vasudevan is an electronics, computer, and IoT enthusiast who likes to apply his knowledge in these fields to make modern living easy for himself and others around him. He has a bachelor's of technology degree in electrical and electronics engineering. He was interested in automation and IoT even before the term IoT became commonplace. He designed and built an automatic overhead-tank motor operator using $1 worth of electronic parts back in 1995, which is operating at his parent’s home to this day. He has automated and made it simple and efficient to operate many household appliances, for example, an automatic geyser switch that turns itself off after 10 minutes, saving electricity. It can be set to switch on at any specified time or can be controlled from anywhere. Today, even his friends and neighbors use this system.
Ajith has worked in the heavy electrical industry before joining his current employer, Infosys Technologies Limited, in the year 2000. He is presently a senior computer scientist at EdgeVerve Systems, a subsidiary of Infosys. At work, he enjoys programming and has done so for over a decade and a half.
I would like to thank Rajeshwari Ganesan for introducing me to the coauthors and Packt Publishing and for giving me the opportunity to coauthor this book. It has been an enjoyable and great learning experience for me.
www.PacktPub.com
eBooks, discount offers, and more
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 [email protected] for more details.
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.
eBooks, discount offers, and morehttps://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