This is a CircuitPython driver for the AM2320 temperature and humidity sensor.
- Author(s): Limor Fried
- Adafruit AM2320 Temperature & Humidity Sensor (Product ID: 3721)
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
A driver for the AM2320 temperature and humidity sensor.
Quickstart: Importing and using the AM2320
Here is an example of using the
AM2320class. First you will need to import the libraries to use the sensor
import board import adafruit_am2320
Once this is done you can define your
board.I2Cobject and define your sensor object
i2c = board.I2C() # uses board.SCL and board.SDA am = adafruit_am2320.AM2320(i2c)
temperature = am.temperature relative_humidity = am.relative_humidity
The measured relative humidity in percent.
The measured temperature in Celsius.