Adafruit_DHT no longer works
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Adafruit_DHT no longer works

by jheo on Wed Feb 27, 2013 2:15 am

I bought a DHT sensor with rpi a few weeks ago and have been using it without problem so far. But today it stopped working. When I run Adafruit_DHT, it just hangs. I tried with other GPIOs, but it hangs. What should I do to find whether the sensor is defective?
jheo
 
Posts: 5
Joined: Fri Jan 25, 2013 10:45 am

Re: Adafruit_DHT no longer works

by adafruit_support_bill on Wed Feb 27, 2013 6:22 am

Is this on a breadboard? Re-seat all your connections and make sure they are secure.
User avatar
adafruit_support_bill
 
Posts: 29726
Joined: Sat Feb 07, 2009 9:11 am

Re: Adafruit_DHT no longer works

by jheo on Wed Feb 27, 2013 8:43 pm

I confirmed it's well connected in several ways. I've checked with strace. In the Adafruit_DHT.c, the following part is hanging.

// wait for pin to drop?
while (bcm2835_gpio_lev(pin) == 1) {
usleep(1);
}

Any insight?
jheo
 
Posts: 5
Joined: Fri Jan 25, 2013 10:45 am

Re: Adafruit_DHT no longer works

by adafruit_support_rick on Thu Feb 28, 2013 6:14 am

Use a multimeter to double-check for continuity between the DHT pin and the cobbler gpio pin. If that rings out, then you've probably got a bad DHT. Email support@adafruit.com with a link to this thread and ask for a replacement.
User avatar
adafruit_support_rick
 
Posts: 12101
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: Adafruit_DHT no longer works

by jheo on Thu Feb 28, 2013 8:52 am

I'll check the sensor this evening again, and will contact the support.

Could you recommend a stable temperature sensor for RPi? I am measuring room temperature every 5 minutes. I found many people have trouble with DHT22. Maybe I would need to consider using a better sensor.
jheo
 
Posts: 5
Joined: Fri Jan 25, 2013 10:45 am

Re: Adafruit_DHT no longer works

by adafruit_support_rick on Thu Feb 28, 2013 10:33 am

Try a digital sensor, like the DS18B20:
We have a tutorial for using it with the Pi.
User avatar
adafruit_support_rick
 
Posts: 12101
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY