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

Huge difference in readings CONTINUOUS_HIGH_RES_MODE vs CONTINUOUS_HIGH_RES_MODE_2 #49

Closed
wilhelmzeuschner opened this issue Jul 20, 2018 · 3 comments

Comments

@wilhelmzeuschner
Copy link

wilhelmzeuschner commented Jul 20, 2018

I get very different readings, which differ by a factor of ~2:

  1. CONTINUOUS_HIGH_RES_MODE gives me: 160 "lx" under a bright LED bulb, but facing the wall.
  2. CONTINUOUS_HIGH_RES_MODE_2 gives me: 320 "lx" in the same environment.

Example:

  1. 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 | 161 |
  2. 227 | 234 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | 324 | (at first I was covering the sensor a bit)

Which one of these readings is correct and what went wrong with the other one? Sadly I cannot really guess which one is correct because I cant really put them in perspective, i.e. I have no idea what to expect. My question is not, which of these readings is correct for my particular scenario, rather which one is correctly calculated / measured.

@coelner
Copy link
Contributor

coelner commented Jul 30, 2018

That is correct because you get a shifted value for the Mode2. It is documented in the datasheet.
I am currently working on additional functionality but the patches are not ready yet.
Simple solution is to divide the Mode2 values with 2.

@coelner
Copy link
Contributor

coelner commented Jul 31, 2018

@wilhelmzeuschner #46 it is currently in beta status, but your problem is solved

https://github.com/coelner/BH1750/blob/a30562d2783f6bfafb75190a06fd950f9b58a68f/BH1750.cpp#L285-L287

@claws
Copy link
Owner

claws commented Oct 3, 2018

Closing this issue as #46 is now merged.

@claws claws closed this as completed Oct 3, 2018
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

3 participants