30 #define AM2315_NAME "am2315" 31 #define AM2315_I2C_ADDRESS 0x5c 33 #define AM2315_READ 0x03 34 #define AM2315_WRITE 0x10 37 #define AM2315_HUMIDITY 0x00 38 #define AM2315_TEMP 0x02 39 #define AM2315_MODEL 0x08 40 #define AM2315_VERSION 0x0A 41 #define AM2315_ID 0x0B 42 #define AM2315_STATUS 0x0F 43 #define AM2315_USER_A 0x10 44 #define AM2315_USER_B 0x12 46 #define AM2315_SAMPLE 2 48 #define HIGH_PRIORITY 99 88 AM2315 (
int bus,
int devAddr=AM2315_I2C_ADDRESS);
182 mraa_i2c_context m_i2ControlCtx;
184 void update_values(
void);
185 uint8_t i2cReadReg(
int reg, uint8_t* data,
int ilen);
186 int i2cWriteReg(uint8_t reg, uint8_t* data, uint8_t ilen);
187 uint16_t crc16(uint8_t* ptr, uint8_t len);
189 int32_t m_temperature;
int i2cWriteReg_32(int reg, uint32_t ival)
Definition: am2315.cpp:272
AM2315(int bus, int devAddr=AM2315_I2C_ADDRESS)
Definition: am2315.cpp:38
~AM2315()
Definition: am2315.cpp:71
float getHumidity(void)
Definition: am2315.cpp:106
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
API for the AM2315 Temperature & Humidity Sensor.
Definition: am2315.hpp:80
uint8_t i2cReadReg_8(int reg)
Definition: am2315.cpp:313
float getTemperatureF(void)
Definition: am2315.cpp:100
int testSensor(void)
Definition: am2315.cpp:119
float getTemperature(void)
Definition: am2315.cpp:93
int i2cWriteReg_8(int reg, uint8_t ival)
Definition: am2315.cpp:290
uint32_t i2cReadReg_32(int reg)
Definition: am2315.cpp:298
uint16_t i2cReadReg_16(int reg)
Definition: am2315.cpp:306
int i2cWriteReg_16(int reg, uint16_t ival)
Definition: am2315.cpp:282