Book Image

Learning IoT with Particle Photon and Electron

By : Rashid Khan, Kajari Ghoshdastidar, Ajith Vasudevan
Book Image

Learning IoT with Particle Photon and Electron

By: Rashid Khan, Kajari Ghoshdastidar, Ajith Vasudevan

Overview of this book

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.
Table of Contents (11 chapters)

Chapter 5. Of Cars and Controllers

In this chapter, you are going to build a connected model car that can be controlled remotely. We will show you how this can be done by using the Photon as well as the Electron. We will demonstrate remote control of the model car using a computer keyboard as well as a Leap Motion (https://www.leapmotion.com/) controller.

We will begin with a discussion about the components to be used to build the model car, and how they should be connected and assembled together. We will use the local server setup from the Local Server Setup section in Chapter 3, P2P and Local Server, and plug in our code for controlling the car.

Towards the end of this chapter, we will explore an idea for hand-gesture control of the car using a Leap Motion controller.

This chapter covers the following topics:

  • Building the model car – hardware components

  • Building the model car – prerequisites

  • Putting it all together and controlling the car

  • Moving the car with gestures

  • Programming the car with the...