There is a message that the code at Senserion should be used, but that is forked from this and I can not make an Issue there.
There is not need to wait after a Wire.requestFrom(). When the Wire.requestFrom() returns, the I2C transaction has completely finished and the received data is waiting in a buffer in the Wire library.
There is no need for a delay, no need for a number of tries.
This incorrect use of the Wire library is at Senserion in SHTSensor.cpp, and here in shti2chelper.cpp.
Thanks for the change request, looks good to me. I added i minor request to the MR (removal of unused MAX_I2C_READ_TRIES constant), but it looks good otherwise
There is a message that the code at Senserion should be used, but that is forked from this and I can not make an Issue there.
There is not need to wait after a Wire.requestFrom(). When the Wire.requestFrom() returns, the I2C transaction has completely finished and the received data is waiting in a buffer in the Wire library. There is no need for a delay, no need for a number of tries.
This incorrect use of the Wire library is at Senserion in SHTSensor.cpp, and here in shti2chelper.cpp.