I've Googled for threads about the DHT22, there seem to be a lot! However I think my problem is a bit different. If not, please point me to a relevant link.
I've got a DHT22 (from Adafruit) mounted on a custom board, and after a bit of mucking around because the clock was running at 8 Mhz got readings from it. I know I should post all my code, but really the relevant lines are:
humidity = dht.readHumidity(); temperature = dht.readTemperature();
The rest is infrastructure to log the results to an SD card, etc.
Now the temperature is OK, within a degree or two of other measurements. But the humidity just looks like the inverse of the temperature, eg.
You can see that from about 9 pm onwards, when we turned the heating off, the temperature dropped slowly. And next morning, with the heating back on, it climbed again fairly sharply.
But the humidity seems to be doing the opposite! I can't really believe that a closed room will gradually increase in humidity like that during the night, and then that it would drop back again next morning.
I thought maybe "bad code" or "bad wiring" but I found this other site:
And he had an almost identical chart:
Is there some sort of temperature compensation you are supposed to apply to the humidity figure? It just doesn't look right.