I have been trying to get a AM2315 I2C Hygrometer to work with my BBB. The datasheet Says that I have to wake up the sensor before using it. I have tried writing to it once, then waiting the 800us it wants. I then sent the write command to tell it to send me the 4 bytes required to calculate the temp and RH. Nothing is working right, played with the timing, tried several libs etc.
Out of desperation I searched more and found this explanation of the problem a user had with this sensor and a Raspberry PI.
on page 3 - “The AM2315 device requires a standard SMBus write function to request the data, but then simply writes the data response immediately on the i2c bus. It does not bother waiting for an SMBus formatted read request”
He decided to use a library called quick2wire that is not for the BBB - and he concluded this →
on page 4 - “So, why did the Quick2Wire library work and the SMBus library did not? Simple. The Quick2Wire library has a function that allows a direct read off the i2c bus without sending a command code (i2c.reading(AM2315_addr, no_bytes).”
Any suggestions on how I deal with this? I am working in c++ at the moment, but I will use anything will get it done.
The full article quoted above is here
In case you are wondering, yes I have configured the i2c bus. I can get several devices to work well.
Thanks in advance.