Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

ImportError:No Module named Adafruit_DHT
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

ImportError:No Module named Adafruit_DHT

by ryandsouza on Tue Jan 19, 2016 10:17 pm

Getting this error message when trying to run this
https://learn.adafruit.com/dht-humidity ... ll-updated

Testing the Library
To test the Python library you can run some of the example programs in the examples folder. The AdafruitDHT.py example is a simple program which takes from the command line parameters the type of sensor (11, 22, or 2302) and GPIO pin connected to the sensor, and displays a single reading from the sensor.

First navigate to the examples folder by executing:

cd examples
Now to run the example on a Raspberry Pi with an AM2302 sensor connected to GPIO #4, execute:

sudo ./AdafruitDHT.py 2302 4
Make sure to run the command as root with the sudo command as shown above or else the program will fail to run (root access is required for reading and writing the GPIO pins).

ryandsouza
 
Posts: 4
Joined: Tue Jan 19, 2016 9:46 pm

Re: ImportError:No Module named Adafruit_DHT

by adafruit_support_rick on Wed Jan 20, 2016 5:52 am


adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: ImportError:No Module named Adafruit_DHT

by ryandsouza on Fri Jan 22, 2016 7:08 pm

Yes I did.

Now when I try sudo ./AdafruitDHT.py 2302 4

I get

Failed to get reading. Try again!

My wiring is correct & I have tried several times, please advise what I need to do to ensure the AM2302 sensor is working?

ryandsouza
 
Posts: 4
Joined: Tue Jan 19, 2016 9:46 pm

Re: ImportError:No Module named Adafruit_DHT

by franklin97355 on Sat Jan 23, 2016 1:02 am

Post up pictures of your module and connections.

franklin97355
 
Posts: 21578
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: ImportError:No Module named Adafruit_DHT

by ryandsouza on Tue Jan 26, 2016 3:48 pm

As requested, I have added the pictures of the project & wiring.

Let me know if you recommend any wiring changes?

You can also call me at your convenience to discuss?

My cell# 908 912 4160

Thanks Ryan
Attachments
IMG_0389.JPG
IMG_0389.JPG (72.59 KiB) Viewed 4361 times
IMG_0388.JPG
IMG_0388.JPG (115.65 KiB) Viewed 4361 times
IMG_0387.JPG
IMG_0387.JPG (106.55 KiB) Viewed 4361 times

ryandsouza
 
Posts: 4
Joined: Tue Jan 19, 2016 9:46 pm

Re: ImportError:No Module named Adafruit_DHT

by adafruit2 on Wed Jan 27, 2016 6:12 pm

do you have an oscilloscope, that would help deterimine where the signal may be failing

adafruit2
Site Admin
 
Posts: 19368
Joined: Fri Mar 11, 2005 7:36 pm

Re: ImportError:No Module named Adafruit_DHT

by adafruit_support_rick on Thu Jan 28, 2016 10:06 am

Also, are the wire splices between the sensor and the jumpers soldered, or just twisted?

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Please be positive and constructive with your questions and comments.