pololu/lis3mdl-arduino

There should be no Wire.endTransmission() after the Wire.requestFrom() and no timeout.

Koepel opened this issue · 0 comments

A Wire.endTransmission is only needed when writing data, it should not be used with Wire.requestFrom().

There is no need for a timeout after Wire.requestFrom(). When the Wire.requestFrom() returns, the complete I2C transmission has already finished, and the received data is waiting in the receive buffer inside the Wire library.