I2C hold master mode Vs no hold master
By looking at the SHT21 library code, and how it uses the underlying I2C bus with Arduino Wire library, the SHT21 code is not exactly compatible with &quot;No Hold Master&quot; reading if the result is tried to read back earlier than when it is ready.
When the temperature or humidity read is started, the SHT21 will not respond to it's I2C address until it is ready. The SHT21 library code starts I2C command to do a conversion, delays for approximately the time that it takes to perform the conversion, and then starts an I2C read only once and then waits for 3 bytes to be transferred. Since the I2C read failed already when SHT21 sensor does not acknowledge the address, there will never be any bytes transferred, so the code times out and returns with 0. This will happen if for some reason the delay is not long enough, and the sensor is still doing the conversion. The sequence should be so that if the sensor was not ready, the read should be started again.
The delay should be long enough as it is what the datasheet recommends, but perhaps there is something else that makes it spend more time doing the conversion or the delays are shorter than actually requested.
The reason why the &quot;Hold Master&quot; mode works, is that when the SHT21 sensor is performing a conversion, it will respond to the I2C read with an acknowledge, but pulls the I2C SCK pin low to make the host wait until conversion is ready. The Arduino Wire library can handle the clock stretching, and it does not have to wait that long, as the bulk delay has already been done separately after starting a conversion.