In this chapter, we have interfaced with a 16x2 character display directly connected to the Raspberry Pi and covered the code used to change the content. We have covered how we are able to read analog data with digital pins by implementing an RC circuit. By attaching a relay with a transistor we have seen how we can switch a 5 V device with a 3 V signal pin that in turn is able to turn on a high-power device. And last but not least, we have taken the first steps with the Raspberry Pi integrated Bluetooth chip to detect nearby Bluetooth devices. This has all led us to our very first home automation project, allowing us to detect presence based on ambient lighting to switch a relay.
As you may have noticed, we looked quite deeply into each step of the code. This is meant as the introduction into the foundations of the Pi4J libraries and how these are used. We have not covered every part yet, only the basics...