Learning IoT with Particle Photon and Electron
()
About this ebook
- 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.
Related to Learning IoT with Particle Photon and Electron
Related ebooks
Practical C Programming: Solutions for modern C developers to create efficient and well-structured programs Rating: 0 out of 5 stars0 ratingsApplication Development with Qt Creator - Second Edition Rating: 4 out of 5 stars4/5Smart Internet of Things Projects Rating: 4 out of 5 stars4/5Python Unlocked Rating: 0 out of 5 stars0 ratingsMastering BeagleBone Robotics Rating: 5 out of 5 stars5/5Hands-on TinyML: Harness the power of Machine Learning on the edge devices (English Edition) Rating: 5 out of 5 stars5/5Building Networks and Servers Using BeagleBone Rating: 0 out of 5 stars0 ratingsMQTT Essentials - A Lightweight IoT Protocol Rating: 0 out of 5 stars0 ratingsProgramming the BeagleBone Rating: 0 out of 5 stars0 ratingsNear Field Communication with Android Cookbook Rating: 0 out of 5 stars0 ratingsFundamentals of IoT: Get familiar with the building blocks of IoT (English Edition) Rating: 0 out of 5 stars0 ratingsInternet of Things with Intel Galileo Rating: 0 out of 5 stars0 ratingsBeagleBone By Example Rating: 0 out of 5 stars0 ratingsOpenFlow Cookbook Rating: 5 out of 5 stars5/5System Design for Telecommunication Gateways Rating: 0 out of 5 stars0 ratingsIntroduction to TinyML Rating: 5 out of 5 stars5/5C++ Networking 101: Unlocking Sockets, Protocols, VPNs, and Asynchronous I/O with 75+ sample programs Rating: 0 out of 5 stars0 ratingsGetting Started with tmux Rating: 0 out of 5 stars0 ratingsLearn IoT Programming Using Node-RED: Begin to Code Full Stack IoT Apps and Edge Devices with Raspberry Pi, NodeJS, and Grafana Rating: 0 out of 5 stars0 ratingsMastering Go Network Automation Rating: 0 out of 5 stars0 ratingsBeginning Linux Programming Rating: 0 out of 5 stars0 ratingsIoT Security Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsLighttpd Rating: 4 out of 5 stars4/5Your First Week With Node.js Rating: 0 out of 5 stars0 ratingsHaxe Game Development Essentials Rating: 0 out of 5 stars0 ratingsDigital Electronics, Computer Architecture and Microprocessor Design Principles Rating: 0 out of 5 stars0 ratingsBeagleBone Robotic Projects Rating: 5 out of 5 stars5/5Embedded Linux Projects Using Yocto Project Cookbook Rating: 5 out of 5 stars5/5Embedded Ethernet and Internet Complete Rating: 4 out of 5 stars4/5Embedded Linux Development with Yocto Project Rating: 0 out of 5 stars0 ratings
Internet & Web For You
Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Notion for Beginners: Notion for Work, Play, and Productivity Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Token Economy: How the Web3 reinvents the Internet Rating: 4 out of 5 stars4/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5Get Into UX: A foolproof guide to getting your first user experience job Rating: 4 out of 5 stars4/5JavaScript: Advanced Guide to Programming Code with JavaScript Rating: 0 out of 5 stars0 ratingsThe Logo Brainstorm Book: A Comprehensive Guide for Exploring Design Directions 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/5The $1,000,000 Web Designer Guide: A Practical Guide for Wealth and Freedom as an Online Freelancer Rating: 4 out of 5 stars4/5React Projects: Build 12 real-world applications from scratch using React, React Native, and React 360 Rating: 0 out of 5 stars0 ratingsPrinciples of Web Design Rating: 0 out of 5 stars0 ratingsHTML, CSS, & JavaScript All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsRESTful API Design - Best Practices in API Design with REST: API-University Series, #3 Rating: 5 out of 5 stars5/5Coding For Dummies Rating: 5 out of 5 stars5/5Social Engineering: The Science of Human Hacking Rating: 3 out of 5 stars3/5Permanent Record: A Memoir of a Reluctant Whistleblower Rating: 5 out of 5 stars5/5UX/UI Design Playbook Rating: 4 out of 5 stars4/5Learn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5Python Projects for Kids Rating: 5 out of 5 stars5/5Ultimate Tailwind CSS Handbook: Build sleek and modern websites with immersive UIs using Tailwind CSS Rating: 0 out of 5 stars0 ratingsStop Asking Questions: How to Lead High-Impact Interviews and Learn Anything from Anyone Rating: 5 out of 5 stars5/5Learn PHP Programming in 7Days: Ultimate PHP Crash Course For Beginners Rating: 3 out of 5 stars3/5Sad by Design: On Platform Nihilism Rating: 4 out of 5 stars4/5The Designer’s Guide to Figma: Master Prototyping, Collaboration, Handoff, and Workflow Rating: 0 out of 5 stars0 ratingsThe Jeremy Fragrance Story: Power, Baby! Rating: 0 out of 5 stars0 ratingsLearn NodeJS in 1 Day: Complete Node JS Guide with Examples Rating: 3 out of 5 stars3/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 customercare@packtpub.com 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.
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