I am trying to build a '168 based project for monitoring the temperature in my greenhouse during the winter. While I was at it I thought I would use a DHT22 to get the humidity too. Sensor came from e-bay and reads OK using code based on LadyAda's library (https://github.com/adafruit/DHT-sensor-library
The idea is that it will run through the winter, display current temp on a 3-digit 7-segment display, keep track of max, min and average temp (& humidity) and if it gets too cold it will kick in a heater on a relay.
I'm just using a bootloaded '168 on a breadboard at the moment but it's all hooked up and the code works - it measures the temp, averages it, displays current temp and responds to a button-press to display other measurements (max, min etc). It will run fine for several hours.
However, if I leave it running overnight, by the time I get up in the morning the sensor will be giving a read-error. It doesn't respond to a reset of the '168 but if I kill all the power and start again, it reads fine again.
It's quite hard to track this fault down because it takes several hours each time to test a new configuration! I am currently using a 10K between power and data on the DHT22 and I thought about trying a 4.7K (LadyAda seems to suggest that either is fine) but I can't see what difference it will make.
Ultimately, if I can't make it stable, I may have to power the DHT22 from a pin on the micro-controller, so that I can turn it off and on again every few hours but that's not very satisfactory. Anyone have any experience of this issue or any thoughts on what I can do to stabilise it?