O'Reilly logo

Internet of Things Programming with JavaScript by Ruben Oliva Ramos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling Lights with electrical circuits

In the following sections, you will find ideas on how to dive into more projects that control other devices in the house.

Electrical appliances

In houses we have electrical appliances, for example, lamps, washing machines, heaters, and other appliances that we only need to turn on or off. In this section, we will learn how to control a lamp connected to the Raspberry Pi Zero, using electrical circuits for interfacing the signal. We will use an optocoupler such as MOC3011, and a Triac. The following figure shows the circuit of the application:

Electrical appliances

Here we have the final project connected to the Raspberry pi Zero: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required