-
Notifications
You must be signed in to change notification settings - Fork 108
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
Lower bits of MTreg #57
Comments
I think you are correct. Do you want to submit a pull request? |
Thanks for the comment. Yup, I can do that if you prefer. But I've not set up the repo/branch yet, so I'm perfectly fine/happy if you could make the change on behalf of me. |
Do you have a use case that can test the change? If so can you test the change in the merge request (#58) branch I just raised to apply the fix? |
Cool! I just confirmed that, with the fix, readLightLevel gives a consistent value regardless of the sensitivity. Before the fix, MTreg=39 and MTreg=63 give very different numbers, for example. By the way, another thing I realized while testing is that readLightLevel returns an inconsistent number if it's called right after calling setMTreg with the mode = ONE_SHOT_. setMTreg has delay_ms when the mode is CONTINUOUS but not ONE_SHOT_, and this inconsistent behavior doesn't happen in CONTINUOUS_ modes. |
BH1750/BH1750.cpp
Line 156 in a49b085
Shouldn't we keep 5 bits rather than 3 bits?
The text was updated successfully, but these errors were encountered: