Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No need to wait after Wire.requestFrom() #1

Open
Koepel opened this issue Sep 10, 2017 · 0 comments
Open

No need to wait after Wire.requestFrom() #1

Koepel opened this issue Sep 10, 2017 · 0 comments

Comments

@Koepel
Copy link

Koepel commented Sep 10, 2017

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 to wait to read data from that buffer.

In the file "EEEnthusiast/MPU-6050 Implementation/MPU6050_Implementation/MPU6050_Implementation.ino", you can remove the two lines with: while(Wire.available() < 6); after the Wire.requestFrom().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant