Raspberry Pi DHT11 DHT22 Temperature and Humidity Sensor

preview_player
Показать описание
Support this Channel on Patreon:

In this video, we're going to cover how to use the DHT11 or DHT22 Temperature and Humidity Sensor with the Rapberry Pi.

Detailed article and wiring diagrams here:

Sensor Wiki:

Parts List for Project:

Visit the Murray² Forum:

Find us on Social Media:
Рекомендации по теме
Комментарии
Автор

I’m a network engineer too. You are a completely higher level then me. I fix things caused by user error in a daily basis.

foxhallww
Автор

This is the perfect addition to a homemade wood kiln.

bulkhead
Автор

Cool. I ordered some of these a few weeks back. Still waiting for them to arrive (slow boat from China)

matthiaswandel
Автор

import Adafruit_DHT
import time
 
DHT_SENSOR = Adafruit_DHT.DHT11
DHT_PIN = 4
 
while True:
    humidity, temperature = Adafruit_DHT.read(DHT_SENSOR, DHT_PIN)
    if humidity is not None and temperature is not None:
        print("Temp={0:0.1f}C Humidity={1:0.1f}%".format(temperature, humidity))
    else:
        print("Sensor failure. Check wiring.");
    time.sleep(3);

anniyangX
Автор

If you need to track the temperature of a project using a Raspberry Pi, the DHT11 and DHT22 temperature and humidity combo sensor is the perfect choice!

TheGeekPub
Автор

This code does not work on a Raspberry Pi4. How can we get it to work on the Pi4?

watsthislifefor
Автор

Thank you; you just save my summer class.

patricklaakak
Автор

Excellent tutorial, clean and basic, thank you!
I was wondering what if we do the data communication using wi-fi or bluetooth modules -to remove the cable dependency- would it make sense? Tbh, I am searching for this need and could not find a good tutor like you so far, keeping an eye on the channel :P

caginbektas
Автор

Don't understand it . The labels on the sensor marked: GND, Data, VCC .In the video you connect with the black cable the vcc with gnd and with red the gnd to 5V. (sensor pin to Rasp.pin)

lewiqe
Автор

I always get Sensor Failure. Check Wiring, I have check the wires the led in the module is glowing. But output from the sensor cannot bt obtain. Any suggestions.

naoeuroi
Автор

iam unable read humid and temperature values with my Pi 4, instead iam getting continuos none values ( using new DHT11 and Pi 4 )

talarikarun
Автор

You inverted the wires VCC and GND at 1:20. The red wire should be plugged into the right pin. At the end of the video you will see the correct wiring.

kinyo
Автор

Since its all wire-connected, why is there a 65 feet distance limits?

allan
Автор

Hi, is there a way to connect another few DHT11 to the port? Like another 5 or more?
Thanks.

alesjaterka
Автор

@TheGeekPub Please add a comment in the code and an annotation to the video.
IMPORTANT NOTE FOR DHT22
If you're using a DHT22, the Python code will be slightly different. You will have to specify that the DHT_SENSOR is DHT22 rather than DHT11:
```

DHT_SENSOR = Adafruit_DHT.DHT22 # Specifies that you're using DHT22 rather than DHT11
```


Otherwise, you won't get any readings.

eddiejhong
Автор

ok now i need the SAME VIDEO but it uses a picaxe 14M2

robertsteel
Автор

The DHT22 sensor enables temperature measurement in the range of -40 to 80°Celsius
Does your program accept this? I.e it also shows negative temperatures?

dtn
Автор

Can you make a project on how to use the CCS811/BME280 (Qwiic) Environmental Combo

osamaasad
Автор

Great video, Mike! Mike, do you plan on doing more woodworking project videos?

ShawarioX
Автор

Why resistors aren't in use here? thanks

ivko