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

Setting up relay with Raspberry Pi

As of now, Raspberry Pi has the smart weather station sensors attached to it. Now, we are going to add a relay to the setup.

A relay is an electrical switch that is driven by an electronic signal. That is, triggering the relay with logic high 1 will turn on the relay and logic low 0 will turn off the relay.

Some relays work the other way around, depending on the component. To know more about types of relay and how they work, refer to, https://www.phidgets.com/docs/Mechanical_Relay_Primer.

You can purchase a simple 5V driven relay from Amazon: (https://www.amazon.com/DAOKI%C2%AE-Arduino-Indicator-Channel-Official/dp/B00XT0OSUQ/ref=sr_1_3).

Relays deal with AC current, and in our examples, we are not going ...
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