We will begin by creating the circuit illustrated in Figure 9.2 on our breadboard:
Figure 9.2 – DHT sensor schematic
The following is the breadboard layout for this circuit that we are about to build:
Figure 9.3 – DHT sensor circuit
Here are the steps to follow, which match the numbered black circles in Figure 9.3:
- Place your DHT11 or DHT22 sensor into your breadboard.
- Place the 10kΩ resistor (R1) into the breadboard. One end of the resistor shares the same row as the DHT sensor's DATA pin. We will discuss this resistor and why it's marked as optional in Figure 9.2 after we complete the circuit build.
- Connect a 3.3-volt pin on your Raspberry Pi to the positive rail of the power rail.
- Connect the 10kΩ resistor (R1) to the positive power rail.
- Connect the DHT Vcc pin to the positive power rail.
- Connect a GND pin on your Raspberry Pi to the negative power rail.
- Connect the GND pin on...