Reader small image

You're reading from  Learning IoT with Particle Photon and Electron

Product typeBook
Published inSep 2016
Publisher
ISBN-139781785885297
Edition1st Edition
Right arrow
Authors (3):
Rashid Khan
Rashid Khan
author image
Rashid Khan

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.
Read more about Rashid Khan

Kajari Ghoshdastidar
Kajari Ghoshdastidar
author image
Kajari Ghoshdastidar

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.
Read more about Kajari Ghoshdastidar

Ajith Vasudevan
Ajith Vasudevan
author image
Ajith Vasudevan

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 parents 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.
Read more about Ajith Vasudevan

View More author details
Right arrow

Preface

Devices made by Particle (the IoT company formerly known as Spark) are one of the most popular IoT platforms for hobbyists and professionals alike. This fast-paced guide will help you develop IoT-based applications using two of Particle's popular boards—the Photon and the Electron.

What this book covers

Chapter 1, Introducing IoT with Particle Photon and Electron, introduces you to IoT and common hardware and software used in building IoT projects, and lists popular IoT boards. The chapter then introduces Particle, the IoT company, and describes its three main products—the Photon, the Electron, and the Core.

Chapter 2, Fire Up Your Kit, gives a brief introduction to the workings of FreeRTOS, the operating system of Photon. The chapter goes on to help you build a Twitter and email-interaction project. You will learn to code for Photon using ParticleJS in the web-based IDE called Particle Build.

Chapter 3, P2P and Local Server, compares two popular network architectures used in IoT projects and shows you how to set up a P2P network for Particle devices. This chapter also describes how to set up a local server to make communication between devices faster. Finally, we will introduce you to other popular protocols and architectures used in IoT.

Chapter 4, Connecting the Sensors, shows you how to build a smart kitchen using a network of Photons with cloud-based data storage, analysis, and notifications using webhooks.

Chapter 5, Of Cars and Controllers, teaches you how to use Photon and Electron to build a connected model car that is capable of being controlled remotely using a keyboard. We will also show you how to modify this project to control the car by hand gestures using a Leap Motion controller.

Chapter 6, Hacking the Firmware, talks about the role of firmware in the Particle devices and shows you different ways to obtain and deploy the firmware on them. We will also list the advantages of custom firmware, taking the case of the VoodooSpark custom firmware as an example.

What you need for this book

This book describes various IoT projects that you will want to try out. In order to successfully execute these projects, the following software needs to be installed on your computer:

  • Linux (preferable) or the Windows operating system.

  • eBook reader helps you open the eBook version of this book on your computer for ease of copying code snippets to and from the book to your code editor on the computer.

  • A text editor, such as GEdit (Linux) or Notepad++ (Windows), to edit the code locally.

  • A web browser to access and use a web-based code editor and to download software.

  • Node.js (https://www.nodejs.org)—a JavaScript runtime built on Chrome's V8 JavaScript engine.

  • Particle CLI (https://docs.particle.io/guide/tools-and-features/cli/photon/)—a command-line interface from Particle.

  • Particle driver for Windows is required only if you're using Windows OS. For more information, see https://docs.particle.io/guide/getting-started/connect/photon/, and look for the Installing the Particle driver section.

  • Cylon.js (https://cylonjs.com/)—a JavaScript framework for robotics, physical computing, and IoT.

  • ARM GCC—an ARM variant of the GCC compiler tool chain for the C language.

  • make, a command-line utility that compiles and builds binaries from source code.

  • Git, a distributed version-control system.

    The Obtaining firmware by building from source section of Chapter 6Hacking the Firmware, describes how you can obtain ARM GCC, make, and Git for Windows, Linux, and Mac OS.

  • DFU-Util (http://dfu-Util.sourceforge.net/)—a utility to download and upload firmware to/from devices connected over USB.

The Burning firmware using the DFU-Util method section of Chapter 6, Hacking the Firmware, describes how you can obtain DFU-Util for Windows, Linux, and Mac OS.

Who this book is for

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.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The driver is called spark_core.cat."

A block of code is set as follows:

{
  "event": "twitterFetch",
  "url": "https://api.twitter.com/1.1/search/tweets.json",
  "requestType": "GET",
  "headers": {
    "Authorization" : "Bearer XXXXXX"
  },

Any command-line input or output is written as follows:

$ particle setup

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Select the Advanced tab."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/LearningIoTwithParticlePhotonandElectron_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Learning IoT with Particle Photon and Electron
Published in: Sep 2016Publisher: ISBN-13: 9781785885297
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (3)

author image
Rashid Khan

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.
Read more about Rashid Khan

author image
Kajari Ghoshdastidar

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.
Read more about Kajari Ghoshdastidar

author image
Ajith Vasudevan

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 parents 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.
Read more about Ajith Vasudevan