-
Notifications
You must be signed in to change notification settings - Fork 5
Common mistakes
Koepel edited this page Mar 24, 2018
·
22 revisions
The Wire.requestFrom() is blocking. It will wait until the I2C bus transaction has finished.
That means that no waiting is needed. If data was received, that data is in a buffer (inside the Wire library) ready to be read with Wire.read().
The Wire.requestFrom() will do a complete I2C bus transaction with: START, send address, read data, STOP.
The Wire.endTransmission() should only be used when writing data and only together with Wire.beginTransmission().