45 uint8_t readRegister(uint8_t reg);
46 void writeRegister(uint8_t reg, uint8_t value);
48 void setMeasurementMode();
51 void setHumidityRes();
52 void triggerMeasurement();
62 HDC2021(uint8_t sdaPin, uint8_t sclPin, uint8_t interruptPin);
float readHumidity()
Read the current relative humidity in percentage.
float readTemperature()
Read the current temperature in degrees Celsius.
void setLowHumidityThreshold(float humid)
Set the low humidity threshold.
void begin()
Initialize the HDC2021 sensor (HDC2021_I2C_ADDRESS — 0x40).
void setHighTempThreshold(float temp)
Set the high temperature threshold.
HDC2021(uint8_t sdaPin, uint8_t sclPin, uint8_t interruptPin)
Construct a new HDC2021 object with specified I2C pins and optional interrupt pin.
void setHighHumidityThreshold(float humid)
Set the high humidity threshold.
void stop()
Stop the HDC2021 sensor.
void setLowTempThreshold(float temp)
Set the low temperature threshold.