You can easily wire this breakout to any microcontroller, we'll be using an Arduino compatible. For another kind of microcontroller, just make sure it has I2C, then port the code - its pretty simple stuff!
- Connect Red wire to the power supply, 3-5V is fine. Use the same voltage that the microcontroller logic is based off of. For most Arduinos, that is 5V
- Connect Black wire to common power/data ground
- Connect the White wire pin to the I2C clock SCL pin on your microcontroller
- Connect the Yellow wire pin to the I2C data SDA pin on your microcontroller
Don't forget to install two 2K-10K pullup resistors from SDA and SCL to Vin (3V or 5V, whatever logic level your microcontroller is)!
The AM2315 has a default I2C address of 0x5C and cannot be changed.
Search for Adafruit_Sensor to locate the Unified Sensor library and Install it
Download Adafruit_AM2315
To begin reading sensor data, you will need to also install the Adafruit_AM2315 library.
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Load Demo
Open up File -> Examples -> Adafruit_AM2315 -> am2315test and upload to your microcontroller wired up to the sensor
Thats it! Now open up the serial terminal window at 9600 speed to begin the test.
You can try breathing on the sensor to increase the humidity.
Page last edited March 08, 2024
Text editor powered by tinymce.