Controlling the lamp using the Raspberry Pi
At this point, we can control the relay locally from our board. Next, it's time to connect the lamp to our relay module.
Note
WARNING: This project require basic knowledge of electricals. We strongly discourage using high-voltage power if you don't have the knowledge or experience. The recommendation is to use a low-voltage 12-V power supply.
Before we connect the lamp, we need to go through some basics about how the relay module will be used. Look closely at the following relay; it contains C, NC, and NO openings on the opposite side to where we inserted the GPIO jumper cables. These slots will be used to connect the lamp to the relay.
The C on the relay stands for common connection, and we will connect the power from our external power supply to this port. Next, we have NC and NO, which stand for normally closed and normally open. In our project, we will be using NO. The reason for this is that it will work...