Commonly used driver functions. Here you you will find the functions you will need to work with the driver.
More...
Commonly used driver functions. Here you you will find the functions you will need to work with the driver.
◆ hih8120_getHumidity()
float hih8120_getHumidity |
( |
void |
| ) |
|
Get latest measured relative humidity percent.
- Returns
- Relative humidity %
◆ hih8120_getHumidityPercent_x10()
uint16_t hih8120_getHumidityPercent_x10 |
( |
void |
| ) |
|
Get latest measured relative humidity percent in tenths of %.
- Returns
- Relative humidity % [x10]
◆ hih8120_getTemperature()
float hih8120_getTemperature |
( |
void |
| ) |
|
Get latest measured temperature in C.
- Returns
- Temperature C
◆ hih8120_getTemperature_x10()
int16_t hih8120_getTemperature_x10 |
( |
void |
| ) |
|
Get latest measured temperature in tenths of C.
- Returns
- Temperature C [x10]
◆ hih8120_isReady()
bool hih8120_isReady |
( |
void |
| ) |
|
Test if result is ready.
- Returns
- boolean
- Return values
-
true | last measuring is finished and the result is ready to be retrieved. |
false | the measuring is in progress and the result is not ready yet. |
◆ hih8120_measure()
Fetch the latest results from the HIH8180 sensor.
- Note
- The sensor goes automatically into sleep mode after each measuring, so it must be waked up by calling
- See also
- hih8120_wakeup before hih8120_measure is called! And remember the delay between the two calls!
- Note
- After this call it is necessary to wait minimum 1 ms before the results can be retrieved with:
- See also
- hih8120_getHumidityPercent_x10
-
hih8120_getTemperature_x10
-
hih8120_getHumidity
-
hih8120_getTemperature.
- Returns
- hih8120DriverReturnCode_t
- Return values
-
HIH8120_OK | Fetch command send to the sensor. |
HIH8120_DRIVER_NOT_INITIALISED | The driver must be initialised before use. |
HIH8120_TWI_BUSY | The TWI/I2C bus is busy, try later. |
◆ hih8120_wakeup()
Wakes up the HIH8180 sensor.
- Note
- After this call it is necessary to wait minimum 50 ms before a measuring can be done
- See also
- hih8120_measure.
- Note
- The sensor goes automatically into sleep mode after each measuring, so this function hih8120_wakeup() must be called before each measuring!
- Returns
- hih8120DriverReturnCode_t
- Return values
-
HIH8120_OK | Wake up command send to the sensor. |
HIH8120_DRIVER_NOT_INITIALISED | The driver must be initialised before use. |
HIH8120_TWI_BUSY | The TWI/I2C bus is busy, try later. |