[SOLVED] AM2315 + Photon Weather Shield = no humidity reading

Because there's a piece in the am2315 datasheet to the effect that the humidity sensor goes to sleep after some period of time and it takes two consecutive reads to wake it up.
clipboard1
I originally had a single read there. That didn't work either.

That loop was there just to try to get the sensor to respond Originally it was just a single read, which returned zero.

Apparently I'm not the only one to have troubles with this device:

The latter thread included the comment:

I had some issues with waking up the sensor. Not sure exactly what I did differently

but kicking it a few times seems to have helped

So I tried that. Didn't help me.

Meanwhile, I decided to nail down the I2C address issue. Scoping the wire, I see:


This sure looks like 0x5C (1011100b) to me. SDA (data) is on top, SCL (clock) is below. From the start point (where both signals go low) you can clearly make out the bits. So my device, even though it's new as of late 2018, is not 0x57.

Notice also that there is very little lag in the rising edges, suggesting that pullup resistance is not the issue.

UPDATE:

I've discovered something else interesting. In the AM2315 library, the functions readTemperature and readHumidity are essentially identical. They both send a query to the sensor for temperature and humidity. The only difference is that readTemperature only returns only the temperature value and readHumidity only returns the humidity value.