matjazl
Posts: 3
Joined: Sat Oct 06, 2012 8:51 am

Using DHT22 & ds18b20 at the same time

Fri May 10, 2013 8:06 pm

Hi,

I was following Adafruit' tutorials on connecting those sensors to raspberryPi.
They work when I connect each one separately. but the problem is they both (in tutorial) uses GPIO 4. ds18b20 is 1wire protocol and DHT22 is not (what is?). can I connect any sensor to other GPIO header?

Thanks!

matjazl
Posts: 3
Joined: Sat Oct 06, 2012 8:51 am

Re: Using DHT22 & ds18b20 at the same time

Sat May 11, 2013 9:53 am

I've managed to get it working.
I've connected ds18b20 sensors on pin 4 (GPCLK0) and DHT22 sensor on pin 18 (PCM_CLK).

Before that I tried connection DHT22 to pin 17, but there were no response using Adafruit example code.
If anyone can explain that?
Can I connect more DHT22 sensors to the same wire, similar as ds18b20?

Thanks!

User avatar
dentex
Posts: 180
Joined: Sun May 20, 2012 7:58 am
Location: Italy
Contact: Website

Re: Using DHT22 & ds18b20 at the same time

Sat Jul 09, 2016 1:28 pm

Sorry to resume an old thread... But instead of opening new ones, I was using the search button... ;) you know...
matjazl wrote:...
Can I connect more DHT22 sensors to the same wire, similar as ds18b20?...
It seems that the answer is NO: quoting some vendor's details page, in regards to the DHT22 (I suppose with the DHT11 will be the same):
Although it uses a single-wire to send data it is not Dallas One Wire compatible! If you want multiple sensors, each one must have its own data pin
One of my projects with the Raspberry Pi:
--------------------------------------------------------
(Raspberry) Pi Aquarium Controller: https://github.com/dentex/piac

Return to “Interfacing (DSI, CSI, I2C, etc.)”