Have a look here: http://www.raspberrypi.org/phpBB3/viewt ... 63&t=47391Aaron Richard wrote:I want to get a temp. and humidity sensor for my Pi but i am not sure if i should get a DHT11 or a DHT22?
I used this Adafruit tutorial below:ammellema wrote:How did you wire this to your pi? I have seen a couple ways none of which i know are safe. So now im almost scared to wire it up. Dont wanna mess up my school project.
richiepp wrote:I tried in vain to get the DHT22 working with the Raspberry Pi a few months ago. I followed the tutorial at Adafruit and could never read from the sensor. I've successfully used the same sensor on an Arduino which took about 15 mins to set up. Has anyone out there successfully used the DHT22 with a Pi?
It is not the same sensor but all the pins are the same. here this should work. btw im sorry if it melted your sensor cause i melted mine. USE 3V3 not 5v!! If you do not want to use pin 4 you could use pins 17,18,21,22,23,24,25. just change the pin name in your code.ammellema wrote:I appreciate the help but.... that wasnt any. If anything it confused me more. Those wires are all going off into space... thats not the right sensor... I am trying to learn the concept but it seems like that just added to "another way to wire" it. Wires arent right colors and what pin is what???? There are 4 wires on a AM2315 I know where the red and black wires go.... There is a yellow SDA and white SCL.... Where do these go From what i understand..... Use 5v power thats what it recommends for accuracy. and that is why i am using that particular sensor. Ground to well ground.. arent the GPIO pins under the 5v power ones supposedly 5v resistant or some good stuff like that. I have seen people straight wire these things :/ Not really what i wanna do though. Do i just pick two random pins that are not rx or tx?? and assign them as theI2C SDA and SCL. are there two that are preset for that... why use 3v3 if there are 5v power and resistand GPIO pins? Still confused. Im just trying to get this up in fritzing before i get the board in the mail.
Good luck!ammellema wrote:Thank you that diagram is easy to follow, the sensor is in the mail. Just got the pi and got it connected to my comp via usb gpio. This thing is tiny! I need a accurate humidity reading^^^^ or i would have taken a dif route already. Let you guys know how it goes:)