Driver for Texas Instruments HCD1000 humidity sensor.
This header file should be included in an application as follows:
#include "stdbool.h"
#include "stdint.h"
Go to the source code of this file.
Functions | |
bool | SensorHdc1000_init (void) |
Initialize the sensor. More... | |
void | SensorHdc1000_start (void) |
Start measurement. More... | |
bool | SensorHdc1000_read (uint16_t *pRawTemp, uint16_t *pRawHum) |
Read humidity sensor data. More... | |
void | SensorHdc1000_convert (uint16_t rawTemp, uint16_t rawHum, float *pTemp, float *pHum) |
Convert raw data to temperature and humidity. More... | |
bool | SensorHdc1000_test (void) |
Humidity sensor self test. More... | |
bool SensorHdc1000_init | ( | void | ) |
Initialize the sensor.
Configure reading of temperature and humidity as one read cycle, and use 14 bit data size.
void SensorHdc1000_start | ( | void | ) |
Start measurement.
bool SensorHdc1000_read | ( | uint16_t * | pRawTemp, |
uint16_t * | pRawHum | ||
) |
Read humidity sensor data.
pRawTemp | - buffer for raw temperature |
pRawHum | - buffer for raw humidity |
void SensorHdc1000_convert | ( | uint16_t | rawTemp, |
uint16_t | rawHum, | ||
float * | pTemp, | ||
float * | pHum | ||
) |
Convert raw data to temperature and humidity.
Calculate relative humidity and temperature based on provided raw data.
rawTemp | - raw temperature value |
rawHum | - raw humidity value |
pTemp | - converted temperature [deg. C] |
pHum | - converted humidity |
bool SensorHdc1000_test | ( | void | ) |
Humidity sensor self test.