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() and it should not be followed by Wire.endTransmission(). #2

Closed
Koepel opened this issue Jul 14, 2018 · 1 comment

Comments

@Koepel
Copy link

Koepel commented Jul 14, 2018

In the file "RoboRuckus/BotCode/Adafruit_HMC5883/Adafruit_HMC5883_U.cpp", you may remove the lines: "while (Wire.available() < 6);", and you may also remove the Wire.endTransmission() after a Wire.requestFrom().
Explanation: Common-mistakes, number 1 and 2.

See also: adafruit/Adafruit_HMC5883_Unified#1

@ShVerni
Copy link
Owner

ShVerni commented Jul 14, 2018

Thanks for the tips! I'm actually planning to switch to a different sensor in the near future since the HMC5883 board I was using has been discontinued. That being the case, I'm not particularly inclined to spend any time messing around with the library especially since it's currently working fine and I plan to dump it soon anyway. However, I'll definitely keep your tips in mind for the future, or if for some reason I am unable to switch to a different sensor.

@ShVerni ShVerni closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants