Upgrading the home automation system
Now that we understand how each means of communication works independently, we will begin controlling more than one device. Let's say, for the sake of this chapter, we are going to control the light and fan in your room, and the light and television in the living room. We are going to use only four home appliances for this section. Once you understand how it works and what we changed from using just one appliance, you will be powerful enough to add more appliances to your home automation system.
Controlling multiple appliances
Controlling four appliances implies that we need four relays. Instead of getting four single 5V relays, buy yourself a 4-channel 5V Arduino-compatible relay as shown in the following image:
Since you have already learned how relays work, there is nothing new here, except that you will be using just one GND pin and one VCC (VIN) pin, which is really convenient. Before creating the entire circuit, let's just connect the Arduino to the...