Hello,
I am working on a data logger using the DHT 22 humidity sensor. My logger runs at 8 mhz to enable running the 328 at 3v3.
I am getting read failures when I try to read the DHT. Reading the library change history it makes reference to:
" Support for non 16mhz devices
Added constructor parameter to allow for different timing needs. It has
the a default value of 6 which is the original value, so it should be
backwards compatible"
What do I need to change and what value is needed for use on an 8 mhz system?
Thanks,
duckie
DHT 22 library on other than 16 mhz systems
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88136
- Joined: Sat Feb 07, 2009 10:11 am
Re: DHT 22 library on other than 16 mhz systems
Hmmm. Not a very well documented change, is it. You would need to add a third parameter to the constructor in your sketch. That is the counter for the receive timing loop which is 6 by default. From looking at the code, I think you would need a smaller number - probably between 3 and 5. That's a small enough range that it shouldn't take too long to find a value that works.
- duckie
- Posts: 11
- Joined: Sun Jul 10, 2011 10:35 am
Re: DHT 22 library on other than 16 mhz systems
Hi,
Thank you. I had already determined that the third parameter was in the constructor, but was unsure of the value. I will try the values you suggest.
Thanks,
Duckie
Thank you. I had already determined that the third parameter was in the constructor, but was unsure of the value. I will try the values you suggest.
Thanks,
Duckie
Please be positive and constructive with your questions and comments.