HIH6130 humidity and temperature sensor

Device driver for Honeywell HumidIcon Digital Humidity/Temperature Sensors: HIH-6130/6131 Series. More...

Detailed Description

Device driver for Honeywell HumidIcon Digital Humidity/Temperature Sensors: HIH-6130/6131 Series.

Files

file  hih6130.h
 Device driver for Honeywell HumidIcon Digital Humidity/Temperature Sensors: HIH-6130/6131 Series.
 

Data Structures

struct  hih6130_t
 Device descriptor for HIH6130/HIH6131 sensors. More...
 

Functions

void hih6130_init (hih6130_t *dev, i2c_t i2c, uint8_t address)
 Initialize a sensor. More...
 
int hih6130_get_humidity_temperature_float (const hih6130_t *dev, float *relative_humidity_percent, float *temperature_celsius)
 Read humidity and temperature from sensor and convert to floating-point. More...
 

Function Documentation

◆ hih6130_get_humidity_temperature_float()

int hih6130_get_humidity_temperature_float ( const hih6130_t dev,
float *  relative_humidity_percent,
float *  temperature_celsius 
)

Read humidity and temperature from sensor and convert to floating-point.

Parameters
[in]devSensor device descriptor
[out]relative_humidity_percentMeasured relative humidity in percent
[out]temperature_celsiusMeasured temperature in degrees Celsius
Returns
0 on success
-1 on error
1 if data is stale

◆ hih6130_init()

void hih6130_init ( hih6130_t dev,
i2c_t  i2c,
uint8_t  address 
)

Initialize a sensor.

Parameters
[out]devdevice descriptor of sensor to initialize
[in]i2cI2C bus the sensor is connected to
[in]addressI2C slave address of the sensor