You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the function readReg(), there is a Wire.endTransmission() after the Wire.requestFrom(). That should not be there. The Wire.endTransmission() is only used when writing data.
In the function read(), there is a timeout after Wire.requestFrom(). That timeout is not needed. The Wire.requestFrom() waits until the I2C transmission has completely finished. After that, the received data is in a buffer in the Wire library. The Wire.available() shows how many bytes there are in that buffer.
The return value of Wire.requestFrom() or the Wire.available() could be be used to check if the correct number of bytes was received or if a bus error did occur.
The text was updated successfully, but these errors were encountered:
In the function readReg(), there is a Wire.endTransmission() after the Wire.requestFrom(). That should not be there. The Wire.endTransmission() is only used when writing data.
In the function read(), there is a timeout after Wire.requestFrom(). That timeout is not needed. The Wire.requestFrom() waits until the I2C transmission has completely finished. After that, the received data is in a buffer in the Wire library. The Wire.available() shows how many bytes there are in that buffer.
The return value of Wire.requestFrom() or the Wire.available() could be be used to check if the correct number of bytes was received or if a bus error did occur.
The text was updated successfully, but these errors were encountered: