IoT Drivers  v3.3.0 (S2022)
Engineering in Software Technology

Commonly used driver functions. Here you you will find the functions you will need to work with the driver. More...

Collaboration diagram for HIH8120 driver functions:

Functions

bool hih8120_isReady (void)
 Test if result is ready. More...
 
hih8120_driverReturnCode_t hih8120_wakeup (void)
 Wakes up the HIH8180 sensor. More...
 
hih8120_driverReturnCode_t hih8120_measure (void)
 Fetch the latest results from the HIH8180 sensor. More...
 
uint16_t hih8120_getHumidityPercent_x10 (void)
 Get latest measured relative humidity percent in tenths of %. More...
 
int16_t hih8120_getTemperature_x10 (void)
 Get latest measured temperature in tenths of C. More...
 
float hih8120_getHumidity (void)
 Get latest measured relative humidity percent. More...
 
float hih8120_getTemperature (void)
 Get latest measured temperature in C. More...
 

Detailed Description

Commonly used driver functions. Here you you will find the functions you will need to work with the driver.

Function Documentation

◆ 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
truelast measuring is finished and the result is ready to be retrieved.
falsethe measuring is in progress and the result is not ready yet.

◆ hih8120_measure()

hih8120_driverReturnCode_t hih8120_measure ( void  )

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_OKFetch command send to the sensor.
HIH8120_DRIVER_NOT_INITIALISEDThe driver must be initialised before use.
HIH8120_TWI_BUSYThe TWI/I2C bus is busy, try later.

◆ hih8120_wakeup()

hih8120_driverReturnCode_t hih8120_wakeup ( void  )

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_OKWake up command send to the sensor.
HIH8120_DRIVER_NOT_INITIALISEDThe driver must be initialised before use.
HIH8120_TWI_BUSYThe TWI/I2C bus is busy, try later.