Book Image

Internet of Things Programming with JavaScript

Book Image

Internet of Things Programming with JavaScript

Overview of this book

The Internet of Things is taking the tech world by storm, and JavaScript is at its helm. This book will get you to grips with this exciting new technology. Where do Node.js, HTML5 and Windows 10 IoT Core come in with JavaScript and IoT? Why Raspberry Pi Zero rather than Arduino? How do you configure and build an IoT network from scratch? All your IoT JavaScript questions are answered in this book.
Table of Contents (15 chapters)
Internet of Things Programming with JavaScript
Credits
About the Author
www.packtpub.com
Customer Feedback
Preface

Controlling and monitoring Arduino, Wi-Fi, and Ethernet shields on connected devices and sensors


In previous sections, we saw how to control and monitor our Arduino boards from a web page using node.js running on a computer in Windows. In this section, we will use our fantastic Raspberry Pi Zero with Node.js installed on it and run the JavaScript application inside the board.

I have seen the potential of the board instead of using a personal computer installed as a web server, with this experience making this projects I want tell that the application is more efficient using our Raspberry Pi Zero running on it.

We will see how to control more than one device in a single dashboard using different devices, such as the following:

  • Wi-Fi shield

  • ESP8266 module

  • Ethernet shield

Building the code to control and monitor devices from a single interface

You can now either copy the code inside a file called app.js, or just get the complete code from the folder for this project.

Configure the outputs of the devices...