Book Image

Mastering IOT

By : Colin Dow, Perry Lea
Book Image

Mastering IOT

By: Colin Dow, Perry Lea

Overview of this book

The Internet of Things (IoT) is the fastest growing technology market. Industries are embracing IoT technologies to improve operational expenses, product life, and people's well-being. We’ll begin our journey with an introduction to Raspberry Pi and quickly jump right into Python programming. We’ll learn all concepts through multiple projects, and then reinforce our learnings by creating an IoT robot car. We’ll examine modern sensor systems and focus on what their power and functionality can bring to our system. We’ll also gain insight into cloud and fog architectures, including the OpenFog standards. The Learning Path will conclude by discussing three forms of prevalent attacks and ways to improve the security of our IoT infrastructure. By the end of this Learning Path, we will have traversed the entire spectrum of technologies needed to build a successful IoT system, and will have the confidence to build, secure, and monitor our IoT infrastructure. This Learning Path includes content from the following Packt products: Internet of Things Programming Projects by Colin Dow Internet of Things for Architects by Perry Lea
Table of Contents (34 chapters)
Title Page
Copyright
About Packt
Contributors
Preface
Free Chapter
1
The IoT Story
Index

Building a JavaScript client to connect to our Raspberry Pi


The following is a screenshot of the HTML JavaScript client we will build to control T.A.R.A.S over the network. The HTML JavaScript client won't win any design awards, but it will serve as an excellent learning platform for sending robot control information over the internet:

The big purple buttons are used to send Forward and Backwards commands to T.A.R.A.S. The smaller green buttons send Turn Left and Turn Right control information to T.A.R.A.S. The small silver buttons at the bottom allow us to take a picture using the camera from T.A.R.A.S, set off an alarm on T.A.R.A.S, and make T.A.R.A.S dance. The Track Distance button connects the HTML JavaScript client to distance information coming from T.A.R.A.S. 

We will track control information using the dashboard in CloudMQTT before we build a Python MQTT client for our Raspberry Pi.

Writing the HTML code

We will start by writing the HTML code for our HTML JavaScript client. You may...