In this section, we will connect our PIR sensor to our Raspberry Pi. The following is the schematic diagram of the circuit we are about to build. As you can see, it has relatively straightforward wiring from the perspective of the PIR sensor:
Figure 11.2 – PIR sensor module circuit
Let's connect it to our Raspberry Pi as illustrated in the following figure:
Figure 11.3 – PIR sensor circuit breadboard layout
Here are the steps to follow to create your breadboard build. The step numbers match the numbers in black circles in Figure 11.3:
- Connect each terminal of your PIR sensor to your breadboard. You will need three male-to-male jumper cables.
- Connect a 5-volt pin on your Raspberry Pi to the same breadboard row used by the PIR's Vcc terminal. PIR sensors only use a little current, so it will be okay to connect the 5-volt Vcc pin directly to your Raspberry Pi.
- Connect a GND pin on your Raspberry Pi to the same...