21#define TEMP_AND_HUMID 0
27#define COMPARATOR_MODE 1
38#define HDC_ADDRESS 0x40
42#define DRDY_STATUS 0x80
56#define HUMID_HIGH 0x03
57#define INTERRUPT_DRDY 0x04
60#define INTERRUPT_CONFIG 0x07
61#define TEMP_OFFSET_ADJUST 0x08
62#define HUM_OFFSET_ADJUST 0x09
63#define TEMP_THR_L 0x0A
64#define TEMP_THR_H 0x0B
65#define HUMID_THR_L 0x0C
66#define HUMID_THR_H 0x0D
67#define HDC_CONFIG 0x0E
68#define MEASUREMENT_CONFIG 0x0F
71#define DEVICE_ID_L 0xFE
72#define DEVICE_ID_H 0xFF
146uint8_t
readReg(uint8_t reg, uint8_t *data, uint8_t count);
147uint8_t
writeReg(uint8_t reg, uint8_t *data, uint8_t count);
uint8_t readTempOffsetAdjust(void)
Reads the temperature offset adjustment value.
void setInterruptPolarity(int polarity)
Configures the electrical behavior of the INT pin when active.
void clearMaxHumidity(void)
Resets the Maximum Humidity peak-hold register to 0.
uint8_t readReg(uint8_t reg, uint8_t *data, uint8_t count)
Reads a specified number of bytes from a sensor register over I2C.
void enableThresholdInterrupt(void)
Enables the high/low temperature and humidity threshold interrupts.
float readMaxTemp(void)
Reads the highest temperature recorded since the last clear.
void reset(void)
Performs a software reset on the HDC2080.
void setRate(int rate)
Sets the automatic measurement frequency.
void setLowHumidity(float humid)
Sets the low humidity threshold for the interrupt pin.
void enableInterrupt(void)
Enables the physical interrupt/DRDY pin.
void setMeasurementMode(int mode)
Configures whether the sensor measures Temp, Humidity, or both.
void enableHeater(void)
Enables the internal heating element of the HDC2080.
float readMaxHumidity(void)
Reads the maximum humidity recorded since the last clear.
void setTempRes(int resolution)
Sets the temperature measurement resolution.
float readLowTempThreshold(void)
Reads the low temperature threshold currently set in the sensor.
void setHighHumidity(float humid)
Sets the high humidity threshold for the interrupt pin.
void setHumidRes(int resolution)
Sets the humidity measurement resolution.
float readHighTempThreshold(void)
Reads the high temperature threshold currently set in the sensor.
void setLowTemp(float temp)
Sets the low temperature threshold for the interrupt pin.
float readHumidity(void)
Reads the relative humidity from the HDC2080 sensor.
void setHighTemp(float temp)
Sets the high temperature threshold for the interrupt pin.
uint8_t readHumidityOffsetAdjust(void)
Reads the humidity offset adjustment value from the sensor.
void disableThresholdInterrupt(void)
Disables the high/low temperature and humidity threshold interrupts.
int initHDC2080(void)
Initializes the HDC2080 sensor with default parameters.
void setInterruptMode(int polarity)
Sets the interrupt pin to either level-sensitive or comparator mode.
void triggerMeasurement(void)
Manually triggers a single measurement cycle.
void enableDRDYInterrupt(void)
Enables the Data Ready (DRDY) interrupt.
void disableHeater(void)
Disables the internal heating element of the HDC2080.
float readHighHumidityThreshold(void)
Reads the high humidity threshold currently set in the sensor.
void disableDRDYInterrupt(void)
Disables the Data Ready (DRDY) interrupt.
float readLowHumidityThreshold(void)
Reads the low humidity threshold currently set in the sensor.
void clearMaxTemp(void)
Resets the Maximum Temperature peak-hold register to 0.
uint8_t writeReg(uint8_t reg, uint8_t *data, uint8_t count)
Writes a specified number of bytes to a sensor register over I2C.
void disableInterrupt(void)
Disables the physical interrupt/DRDY pin (sets to High-Z).
float readTemp(void)
Reads the temperature data from the HDC2080 sensor.
uint8_t setHumidityOffsetAdjust(uint8_t)
Sets the humidity offset adjustment value.
uint8_t readInterruptStatus(void)
Reads the interrupt status register.
uint8_t setTempOffsetAdjust(uint8_t)
Sets the temperature offset adjustment value.