In the previous recipes we saw how to communicate something to Raspberry PI, in this recipe we are going to close the recipes about Raspberry PI with the opposite operation: how to read data that Raspberry PI controls.
Reading data from Raspberry PI
Getting ready
In this recipe we will use the same circuit built previously. The goal is to make small changes to the TCP / IP server, so that at the request of a specific light bulb status it responds with a code to identify whether it is ON or OFF.
We are going to use:
- Raspberry PI 3 Model B
- Two Channel Relay Modules (http://wiki.sunfounder.cc/index.php?title=2_Channel_5V_Relay_Module)
- Two light bulbs and relative supply power (the important thing is that the light bulbs have...