Jump to content
jim

Wiring of DHT22 to pcduino v1

Recommended Posts

sometime it work fine and sometime not. I don't understand.

The error is at the begining of mesurement. First bit are not "catch".

 

logic analyser always ok.

Share this post


Link to post
Share on other sites

The reason it sometimes fails is simply because the interface is bitbanged and the combination of python and linux are not always fast enough. Sometimes the OS requires more cpu time during the reading and causes it to miss a bit which throws an error. The compiled c version does the same thing. I spent a fair amount of time trying to get as much speed as possible from the python code. You are more than welcome to try get it faster.

Share this post


Link to post
Share on other sites

Hi all

 

I have a pcduino1 and dht11

Used the code given above, but receiving zeros for temз and humidity with due point -112.

What i'm doing wrong?

 

ubuntu@ubuntu:/media/5E5F-E641/python-pcduino-master/Samples/blink_led$ python test.py
3
temp is:
0
humidity is:
0
-112.00

Share this post


Link to post
Share on other sites

I wrote that code for the DHT22 sensors. The DHT11's do not return the same number of bytes so it will never read it correctly. You will have to study the spec sheet for DHT11 and modify the code to work as I do not have a DHT11 to work with.

Share this post


Link to post
Share on other sites

Hello again.

Guys, please help.

I don't want to switch to rasp just due to this stuff fails.

 

Checked twice, my dht 11 works on arduino, but in pcduino using the code above i'm recieving only this(no matter sensor pin is connected to analog or to digital):

3
temp is:
0
humidity is:
0
-112.00

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×