We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
These modes power down the chip after the level is read. The present code does not wake up the chip when reading the value in those modes.
I added a save of mode and changed the code in readLightLevel:
uint16_t BH1750::readLightLevel(void) { ... // Start transmission to sensor Wire.beginTransmission(BH1750_I2CADDR); switch (MODE) { case BH1750_ONE_TIME_HIGH_RES_MODE: case BH1750_ONE_TIME_HIGH_RES_MODE_2: case BH1750_ONE_TIME_LOW_RES_MODE: __wire_write((uint8_t)MODE); break; } // Read two bytes from sensor Wire.requestFrom(BH1750_I2CADDR, 2); ... }
The text was updated successfully, but these errors were encountered:
Awesome, thank you!!!
Sorry, something went wrong.
Please add the right delay time for the one-time measurement (datasheet page 7 and page 5 )
@coelner, if you know what to do you are welcome to submit a merge request with the proposed change.
Successfully merging a pull request may close this issue.
These modes power down the chip after the level is read. The present code does not wake up the chip when reading the value in those modes.
I added a save of mode and changed the code in readLightLevel:
The text was updated successfully, but these errors were encountered: