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

BH1750 readLightLevel() eventually returns 27k value in low light environment #85

Open
BenjamimKrug opened this issue Nov 7, 2022 · 1 comment

Comments

@BenjamimKrug
Copy link

I'm working with a custom PCB with an ESP32 Wroom and a BH1750 and using this library to make the readings, most of the times it works perfectly, however eventually the readLightLevel function returns 27 thousand lux, even though it's in a very low level light environment, normally 15 lux. This happens when the I2C clock is at 100k, but doesn't happen in 400k, which seems kinda strange to me, usually the problems happen at higher frequencies, so I think it might be a good idea to see what could be the root of the problem. Ideally I would like to use 100k since the I2C cable is reasonably long, 25cm.
Thank you in advance, and congrats on the great library.

@coelner
Copy link
Contributor

coelner commented Nov 25, 2022

You could use temporarily an other library to check whether it is a problem of this library.

Otherwise you can use any cheap logic analyzer (e.g. https://sigrok.org/wiki/Supported_hardware#Logic_analyzers) to sniff the i2c lines.
As you use a custom pcb, did you use the bare BH1750 with it? Or do you use the common BH1750 module and have this one conncted?

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

2 participants