Trying to get an I2C (AM2315) working with Wire

No, it won't work on the Spark Core. Been there, done that. The AM2315 shares the same peculiar timing requirements as the AM2321 and like. If you take a deep dive into Section 7.2.4 I2C Communication Timing in the AdaFruit manual, you will find that the Spark Core Wire firmware will not be sufficient to meet the AM2315 requirements.

I have then followed the manufacturer's example and wrote a library for this. It was originally for the AM2321 but it should also work with the AM2315. You could give it a try and let me know if it works on your device. Note that I have hardcoded it to use D2 and D3 for the custom I2C and I don't think my code would allow you to share with other I2C devices on the Spark Core.

1 Like