deladriere / euro-modules

63 stars 18 forks source link

Usage of Wire library. #7

Open Koepel opened 5 years ago

Koepel commented 5 years ago

In the files:

the Wire.requestFrom() is followed by a Wire.available(). The return value of those Wire.available() is not used, so you may remove all those Wire.available().

When the Wire.requestFrom() returns, the I2C bus activity has finished and data is waiting in a buffer inside the Wire library. The Wire.available() return the number of bytes that are in that buffer.

deladriere commented 5 years ago

Ok thanks, I will test this and update my code