Configuring the hardware
Now that the required Linux software is in place, we can add sensors to monitor the data that we need.
Here is a schematic to help you out in configuring your own hardware:
- First, connect the 5V and GND to the top or bottom horizontal rows of the breadboard.
- Then, connect the left pin of the TMP36 sensor to the 5V horizontal slot, the middle pin to the analog pin A1, and the right pin to the GND horizontal slot on the breadboard.
- Then, position the photocell in such a way that it is in series with the resistor. The node where the photocell and resistor meet should be connected to the board's analog pin A0.
- Next, connect the free leg of the photocell to the 5V line. The free leg of the resistor should be pinned to the GND.
Here is how the hardware configuration looks when everything is connected:
That's it. We are now ready to use the project.