Putting it all together
At this point, we have a basic idea about how to build our project, and we also have all the software required for our project. In this section, we will go through a number of iterations until we reach the final goal of using a remote device to control the lamp.
We will do this in three steps:
- Control the relay using the Raspberry Pi.
- Control the lamp using the Raspberry Pi.
- Turn on/off the lamp from a smartphone.
During development, it's inefficient to always boot the Raspberry Pi using, for example, an HDMI connection to a TV that also requires a separate mouse and keyboard to control the Pi. Using HDMI, we will not be able to track the early boot procedure either. For this project, we also want to be able to troubleshoot the Raspberry Pi without the need to place it close to a TV. For our project, we will either use SSH or a serial connection to reduce turnaround time during development.
Serial and SSH connections to the Raspberry Pi
The first method is to use a...