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

Auto generated API documentation and code listings for htu21d

Classes

htu21d Measurement specialties / Honeywell HTU21D digital humidity and temperature sensor
htu21d::HTU21snStruct Structure to access HTU21D's serial number

  • HTU21D_sna is the hi 16 bit word of the s/n, always is 0x4854
  • HTU21D_snb is the mid 32 bit word of the s/n, 0x00--------
  • HTU21D_snc is the low 16 bit word of the s/n, 0x32--
  • The complete 64 bit s/n value is: 0x48 54 00 -- -- -- 32 --
  • The numbers shown are fixed fields
  • The '-' numbers are variable
  • For reference, the CRC values for the s/n are included

Code

htu21d.cpp [code]
htu21d.h [code]