The AM2321 is a miniature Temperature and Humidity sensor manufactured by Aosong (GuangZhou) Electronics Co. Ltd.
Even though the manufacturer claims this sensor uses I2C to communicate with it’s host, however, if you read the manual carefully, this sensor has it own I2C communication requirements particularly in the timings, that the standard I2C functionality available on the Spark firmware will not be sufficient.
This library has implemented the required I2C timings and handling of device wake up based on the manufacturer supplied data and the example that comes with this library reads the device ID, temperature and humidity data from the AM2321 and dump them to the Serial line.
You can found this library on the Web IDE, just search for AM2321. Or you can go to my git repo here.
Good luck and have fun!