I’ve been trying unsuccessfully to get the Photon to read data from the AM2315 temperature sensor. My code is pretty simple.
Wire.beginTransmission(0x5C);
delay(2);
Serial.println(Wire.endTransmission());
This prints 2 every time so the sensor isn’t getting initialized properly. My wiring is ok. I have 10k pullup resistors on the SDA and SCL lines and I have verified the sensor works by reading data via a Raspberry Pi.
I tried running the code on the Arduino and it returned 4 instead of 2 but otherwise identical outcomes.
Any idea what I could do to get it working?