Hardware Reference
In-Depth Information
Chapter 2. Control Lights from Your
Phone or Tablet
In this chapter, we are going to tackle another very common project in any home automa-
tion project: controlling lights. There are many devices that you can buy off the shelves that
will give you the ability to control devices in your home, but these devices usually have a
high price point. And even if they are wireless, they usually come with a remote control.
In this project, we are going to take another approach and control lights directly from your
computer, phone, or tablet, all via Wi-Fi. The following will be the major takeaways from
this chapter:
• First, we are going to build the hardware part of our project by connecting a Wi-Fi
chip to Arduino and the device we want to control (here, a simple lamp) to a relay
module. We'll actually use two relay modules in this project, but this can, of
course, be extended to any number you want.
• Then, we are going to write some basic code to test the different parts of the pro-
ject. We will check that the relay module is functioning properly and that the Wi-Fi
chip can indeed be connected to the Wi-Fi network of your home.
• Finally, we'll build a basic graphical interface so that you can control your devices
not only from your computer, but also from a mobile device, such as a smartphone
or a tablet.
Search WWH ::




Custom Search