Feb-05-2021, 10:02 PM
I'm struggling with this simple setup with DHT11. I have wired in the 3-wire DHT11 sensor like this on my RP 2 model B version 1:
Vcc > pin 2 (5V)
Gnd > pin 9 (GND)
Data > pin 7 (GPIO 4)
and I keep getting "DHT sensor not found, check wiring"
I couldn't find a symbol for the 3-wire sensor so disregard the 4th pin.
I have installed the Adafruit_CircuitPython_DHT library.
![[Image: DHT11.png]](https://i.postimg.cc/cJf2LfKM/DHT11.png)
I ran a debug on the code.
Vcc > pin 2 (5V)
Gnd > pin 9 (GND)
Data > pin 7 (GPIO 4)
and I keep getting "DHT sensor not found, check wiring"
I couldn't find a symbol for the 3-wire sensor so disregard the 4th pin.
I have installed the Adafruit_CircuitPython_DHT library.
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT import time import board import adafruit_dht dhtDevice = adafruit_dht.DHT22(board.D4) while True: try: temperature_c = dhtDevice.temperature temperature_f = temperature_c * (9 / 5) + 32 humidity = dhtDevice.humidity print( "Temp: {:.1f} F / {:.1f} C Humidity: {}% ".format( temperature_f, temperature_c, humidity ) ) except RuntimeError as error: # Errors happen fairly often, DHT's are hard to read, just keep going print(error.args[0]) time.sleep(2.0) continue except Exception as error: dhtDevice.exit() raise error time.sleep(2.0)
Error:DHT sensor not found, check wiring
![[Image: DHT11.png]](https://i.postimg.cc/cJf2LfKM/DHT11.png)
I ran a debug on the code.
Output:adafruit_dht <module 'adafruit_dht' from 'home/pi/.local/lib/python3.7/site-packages/adafruit_dht
board <module 'board' from '/usr/local/lib/python3.7/dist-packages/board.py'>
dhtDevice <adafruit_dht.DHT11 object at <0x757727b0>
time <module 'time' (bulit-in)>
The '<0x757727b0>' looks like some kind of address. Could it be something to check? It looks like it has found the sensor after all so why doesn't it work?