csconsulting wrote: ↑Tue Oct 28, 2014 11:13 am
I also have this odd feeling that the "Read" process actually starts the internal processing of the sensor readings ready for the next read. So you are always getting the results of the last actual reading, not the current reading.
I can confirm you odd feeling. I have the exact same issue.
I stumbled upon this issue because I want to take readings every 5 minutes, not every 2 seconds like (I think) every hobby project this sensor is used for.
I noticed that when I breathed on the sensor to increase the humidity, the next reading I took would still be around 40% - 50% (normal humidity levels). The reading I took after that, the humidity level spiked towards 99%.
The same goes the other way around. When I increased the humidity and took a readin, then taking another reading after 5 minutes, the sensor would return a humidity level of 99%. Taking a reading 2 seconds after that returns a normal humidity level, around 40% - 50%.
I've been looking for an explanation for a very long time, but it seems nobody (except you two) stumbled upon this issue before.
I solved this by "flushing" the sensor's cache before actually taking the reading of the values I want. I do this by reading the sensor's values (which returns the cached values, but triggers the mechanism to read the current values), waiting 2 seconds and than reading the values again, returning a close-to-real-time value of the actual temperature and humidity.
I hope this still provides some value for you, even though it's 6 years after your post. Just felt I had to answer, to help anybody else with this same issue in the future.