Library for the Measurement Specialties' HTU21D Humidity and Temperature sensor. Code includes device's heater on/off control, serial number access, dew point calculations and RTOS hooks. To date, code tested on GR-PEACH, K64F and KL25Z boards with and w/o RTOS, SDFlash and USB serial Rx interrupts.

Dependents:   BLE_soil_humidity

Library for the Measurement Specialties / Honeywell HTU21D Humidity and Temperature sensor. Code includes device's heater on/off control, serial number access, dew point calculations and RTOS hooks. To date, code tested on K64F and KL25Z boards with and without RTOS, SDFileSystem and USB serial Rx interrupts.

The HTU21D's serial number is an odd cookie. There are two 16 bit registers and a 32 bit register are combined to generate the serial number. Some of the serial number bit fields are fixed for all devices and some change from part to part.

History

Removed RTOS mutex dependencies, put onus back on calling program. Option to use hi-level i2c commands, needed for the GR-PEACH which has bugs using low-level i2c commands. Add the line #define HTU21Di2cLOWLEVEL 1 in htu21d.h to use low-level i2c default tip

2015-04-30, by loopsva [Thu, 30 Apr 2015 00:34:03 +0000] rev 3

Removed RTOS mutex dependencies, put onus back on calling program. Option to use hi-level i2c commands, needed for the GR-PEACH which has bugs using low-level i2c commands. Add the line #define HTU21Di2cLOWLEVEL 1 in htu21d.h to use low-level i2c


Updated Temperature and Humidity i2c read functions to free up the RTOS and i2c bus while waiting for the Hum / Temp command in the HTU21D to complete.

2014-05-22, by loopsva [Thu, 22 May 2014 18:48:46 +0000] rev 2

Updated Temperature and Humidity i2c read functions to free up the RTOS and i2c bus while waiting for the Hum / Temp command in the HTU21D to complete.


Added serial number access structure. Cleaned up documentation.

2014-05-15, by loopsva [Thu, 15 May 2014 19:12:11 +0000] rev 1

Added serial number access structure. Cleaned up documentation.


Convert to library

2014-05-14, by loopsva [Wed, 14 May 2014 00:31:30 +0000] rev 0

Convert to library