DHT22 / RHT03

Talk about Adafruit Raspberry Pi® accessories!

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/

DHT22 / RHT03

Postby Worcester » Sun Sep 09, 2012 5:40 pm

Been trying to get the RPi to read the output from the DHT22 using the ciruit and code here:
http://learn.adafruit.com/dht-humidity- ... cs-logging

However I'm getting nothing back from the port, I've posted infor on the RPi forum, ( http://www.raspberrypi.org/phpBB3/viewt ... 37&t=15755 ) however still waiting for answers.

1) Yes I have a Pull up resistor in Place,
2) Yes I have an Oscilloscope,

Using the code in
$ sudo ./Adafruit_DHT, the responce I get back is:

Code: Select all
pi@raspberrypi ~/Adafruit-Raspberry-Pi-Python-Code/Adafruit_DHT_Driver $ sudo ./Adafruit_DHT 22 4
Using pin #4
Data (0): 0x0 0x0 0x0 0x0 0x0


Here are the oscillsope traces:
https://picasaweb.google.com/1132605127 ... directlink

So clearly the pin goes low and then comes back up high, though the routine doesn't appear to pul back the data

I've tried different pins - no different, and I;ve tried other routines to do other things using the same pin and they work OK.

I've tried 5V and linked both pins 3 and 4 to gnd (see comments here: https://www.sparkfun.com/products/10167 )

Any ideas?

Thanks, Worcester
Worcester
 
Posts: 1
Joined: Sun Sep 09, 2012 5:26 pm

Re: DHT22 / RHT03

Postby Dwali » Mon Sep 24, 2012 12:24 am

I'm having the same issue with the AM2302. Glad I'm not alone. I've found no solution to this problem yet.
Dwali
 
Posts: 7
Joined: Sun Sep 23, 2012 3:55 pm

Re: DHT22 / RHT03

Postby cynikal » Mon Sep 24, 2012 12:58 am

Ditto,

I've been running this thing in a loop (sleep 3 seconds before polling), and in the last 5 minutes it's answered me maybe twice.. what gives??
cynikal
 
Posts: 7
Joined: Sun Sep 09, 2012 8:38 pm

Re: DHT22 / RHT03

Postby cynikal » Mon Sep 24, 2012 1:31 am

Found the solution at the bottom:

http://www.raspberrypi.org/phpBB3/viewt ... 5&p=179399

basically it involves changing the timing 100 to 500000 and recompiling. It's still not working 100% (e.g. it still returns 0 data) but it's like non-responsive once in 20 times instead of it working once every 20 times
cynikal
 
Posts: 7
Joined: Sun Sep 09, 2012 8:38 pm

Re: DHT22 / RHT03

Postby outspoken » Mon Sep 24, 2012 7:54 am

How did you recompile it?

When I try I get:

Code: Select all
gcc -c -o Adafruit_DHT.o Adafruit_DHT.c -std=c99 -I. -lbcm2835
Adafruit_DHT.c:24:21: fatal error: bcm2835.h: No such file or directory
compilation terminated.
make: *** [Adafruit_DHT.o] Error 1


I can't seem to find bcm2835.h

EDIT: found it, google hides this page quite well - http://www.open.com.au/mikem/bcm2835/index.html
outspoken
 
Posts: 2
Joined: Tue Sep 18, 2012 7:23 pm


Return to Adafruit Raspberry Pi® accessories

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]