Skip to Content
Practical Internet of Things with JavaScript
book

Practical Internet of Things with JavaScript

by Arvind Ravulavaru
December 2017
Intermediate to advanced
296 pages
5h 56m
English
Packt Publishing
Content preview from Practical Internet of Things with JavaScript

Building a smart socket

In this section, we are going to build a smart socket. The setup is going to be quite similar to what we had in Chapter 4, Smart Agriculture. Create a new folder named chapter5 and copy the contents of the chapter4 folder into it. The chapter4 folder has the code for the smart weather station, and now, we are going to add the required code for smart socket.

The smart socket is a simple electrical socket that can be controlled over the internet. That is, turn on the socket and turn off the socket. We are going to use a mechanical relay to achieve this.

We are going to start off by setting up the relay with the other sensors on the Raspberry Pi. I am going to use one Raspberry Pi to demonstrate the smart weather station ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Test-Driving JavaScript Applications

Test-Driving JavaScript Applications

Venkat Subramaniam
Web Caching and Replication

Web Caching and Replication

Michael Rabinovich, Oliver Spatscheck

Publisher Resources

ISBN: 9781788292948Supplemental Content