User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Temperature Not Reading

Mon Apr 10, 2017 3:04 pm

So I got a temperature sensor that is a DHT22 and I am using https://github.com/adafruit/Adafruit_Python_DHT for the reading. This is the code I use https://github.com/adafruit/Adafruit_Py ... ruitDHT.py. I run it in the terminal starting with cd Adafruit_Python_DHT/ then cd example/ python AdafruitDHT.py 22 17 because that is where it is but every time it says to retry. I have triple checked everything. Anybody know how to fix this?

User avatar
joan
Posts: 14472
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Temperature Not Reading

Mon Apr 10, 2017 3:11 pm

How have you connected the DHT22 to the Pi?

http://abyz.co.uk/rpi/pigpio/examples.html#pdif2_DHTXXD will work if the DHT22 isn't bust and if it's connected properly.

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Temperature Not Reading

Mon Apr 10, 2017 5:04 pm

joan wrote:How have you connected the DHT22 to the Pi?

http://abyz.co.uk/rpi/pigpio/examples.html#pdif2_DHTXXD will work if the DHT22 isn't bust and if it's connected properly.
Breadboard. Photo: http://imgur.com/6RP7311. But on a pi 3

User avatar
joan
Posts: 14472
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Temperature Not Reading

Mon Apr 10, 2017 5:18 pm

If you want help you need to provide a photo.

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Temperature Not Reading

Mon Apr 10, 2017 5:45 pm

joan wrote:If you want help you need to provide a photo.
Did the link not work?

User avatar
DougieLawson
Posts: 36544
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Temperature Not Reading

Mon Apr 10, 2017 6:27 pm

I think Joan wants a real-world photo of your physical wiring, not a picture of your theoretical wiring done with Fritzing.

Most of us know the theory of how these things need to be wired, if we're going to help we need to know whether theory matches reality.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
The Monkey
Posts: 25
Joined: Sun Mar 26, 2017 9:55 pm
Contact: Website

Re: Temperature Not Reading

Wed Apr 12, 2017 2:22 pm

DougieLawson wrote:I think Joan wants a real-world photo of your physical wiring, not a picture of your theoretical wiring done with Fritzing.

Most of us know the theory of how these things need to be wired, if we're going to help we need to know whether theory matches reality.
Ok. I'll get an actual photo

Return to “Automation, sensing and robotics”