Closed hawkerboy7 closed 9 years ago
I've seen this happen before when I switched between the DHT22 to the DHT11 sensor without changing the sensor type setting in my code.
This happen because although the library can handle both DHT11 and DHT22 sensor you need to specify which one are you using. They are compatible but use different communication protocols which need different handling in order to get the correct readout value.
So, first thing you should check your code if either the initialize
or readSpec
function call is specifying the correct sensor type (i.e. 11
for the DHT11 and 22
for the DHT22). Please note that the first example in the README file uses an DHT22 (aka AM2302).
Also regarding automake and the m4
directory, you should not need to worry about these if you're using a clean install of raspian and bcm2834 v1.44. Is that what you have? Not sure about bcm2835-1.42 that you said you're using.
Thank you! I am getting good readings now. I used 22 and not 11 as you said.
Yes I used a clean install of raspian but not bcm2834 v1.44. On the website (bcm2835) it says on paragraph 4 that you should use this link: http://www.airspayce.com/mikem/bcm2835/bcm2835-1.42.tar.gz.
But now it works great! Thanks! =D
Hi thanks for this module!
However I do get strange temp and humidity values:
When I breath very close to the sensor the humidity increases to over 1400% and temp around 716.80C. Do you know what went wrong?
Some images on google showed a resistor had to be placed in between pin 1 and 2 (4k7). I did this and also removed it but the values seemed to stay the same so it didn't appear to have any effect.
Do you know what's wrong?
Thanks in advance!
Ohh and also I had to
sudo apt-get install automake
on my RaspberryPiB+ andmkdir m4
inside thebcm2835-1.42
folder to get themake
command working. It's a clean install of raspbian 2015-02-16 so maybe add it to the readme? Some users might benifit from it :)