HTU21D temperature read higher then normal

@Ric, I could be wrong but here is why I thought it was on by default. Taken from the htu21d libary : // 0x2 is the default value of the user register

In the meanwhile, I am trying to modify the library to add a function to print out the setting of the htu21d and manually turn on and off the heater to see if it make a difference.

bool HTU21D::begin(void)
{
// Only join the I2C bus as master if needed
if(! Wire.isEnabled())
Wire.begin();

// Reset the sensor
reset();

// Read User register after reset to confirm sensor is OK
return(read_user_register() == 0x2); // 0x2 is the default value of the user register
}

If Iā€™m reading the data sheet correctly, 0x2 sets bit 1 (the bit numbers start at 0), which is ā€œDisable OTP reloadā€. The enable for the heater is bit 2, so you would have to write 0x4 to set that one.

@Ric, you are right. After printing out the user register, the heater is not on by default. I red the data sheet wrong. So the temperature difference is due to the migration of the boardā€™s heat to the chamber.