API for the AM2315 Temperature & Humidity Sensor.
More...
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.
AM2315 |
( |
int |
bus, |
|
|
int |
devAddr |
|
) |
| |
Instantiates an AM2315 object
- Parameters
-
bus | Number of the used bus |
devAddr | Address of the used I2C device |
mode | AM2315 oversampling |
int i2cReadReg_16 |
( |
int |
reg | ) |
|
Reads a two-byte register
- Parameters
-
reg | Address of the register |
long i2cReadReg_32 |
( |
int |
reg | ) |
|
Reads a four-byte register
- Parameters
-
reg | Address of the register |
short i2cReadReg_8 |
( |
int |
reg | ) |
|
Reads a one-byte register
- Parameters
-
reg | Address of the register |
int i2cWriteReg_16 |
( |
int |
reg, |
|
|
int |
ival |
|
) |
| |
Writes a two-byte (16b) register
- Parameters
-
reg | Address of the register |
ival | 16b value |
int i2cWriteReg_32 |
( |
int |
reg, |
|
|
long |
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 | Address of the register |
ival | 32b value |
int i2cWriteReg_8 |
( |
int |
reg, |
|
|
short |
ival |
|
) |
| |
Writes a one-byte (8b) register
- Parameters
-
reg | Address of the register |
ival | 8b value |
The documentation for this class was generated from the following file:
- /var/lib/jenkins/workspace/upm-doc-stable/build-33/src/am2315/AM2315.java