AM2315 Class
- ID: am2315
- Name: Digital Temperature and Humidity Sensor
- Category: temp
- Manufacturer: adafruit
- Link: http://www.adafruit.com/products/1293
- Connection: i2c
AM2315 by Measurement Specialties ( http://www.aosong.com/asp_bin/Products/en/AM2315.pdf ) is a digital humidity sensor with temperature output. RH reports between 0 and 100%, and the temperature range is -40 to +125 degC. The sampling period of this sensor is 2 seconds. Reads occurring more often than that return cached data.
Item Index
Methods
AM2315
-
bus
-
devAddr
Instantiates an AM2315 object
Parameters:
-
bus
NumberNumber of the used bus
-
devAddr
NumberAddress of the used I2C device
Returns:
getHumidity
()
Number
Gets the current measured humidity [RH]
Data is updated every 2 seconds - accesses occurring more often than that return cached data
Returns:
getTemperature
()
Number
Gets the humidity cell temperature [degC]
Data is updated every 2 seconds - accesses occurring more often than that return cached data
Returns:
getTemperatureF
()
Number
Gets the humidity cell temperature [degF]
Data is updated every 2 seconds - accesses occurring more often than that return cached data
Returns:
testSensor
()
Number
Function intended to test the device and verify it is operating correctly.
Returns:
i2cWriteReg_32
-
reg
-
ival
Writes a four-byte (32b) register
Note: these access routines are not the normal accesses to an I2C device. AM2315 contains a microcontroller that manages the actual readings. These handlers then make requests over I2C using a protocol defined by AM2315 .
Parameters:
-
reg
NumberAddress of the register
-
ival
Number32b value
Returns:
i2cWriteReg_16
-
reg
-
ival
Writes a two-byte (16b) register
Parameters:
-
reg
NumberAddress of the register
-
ival
Number16b value
Returns:
i2cWriteReg_8
-
reg
-
ival
Writes a one-byte (8b) register
Parameters:
-
reg
NumberAddress of the register
-
ival
Number8b value
Returns:
i2cReadReg_32
-
reg
Reads a four-byte register
Parameters:
-
reg
NumberAddress of the register
Returns:
i2cReadReg_16
-
reg
Reads a two-byte register
Parameters:
-
reg
NumberAddress of the register
Returns:
i2cReadReg_8
-
reg
Reads a one-byte register
Parameters:
-
reg
NumberAddress of the register