adafruit / Adafruit_CircuitPython_BH1750

CircuitPython library for use with the Adafruit BH1750 Ambient Light Sensor Breakout
MIT License
4 stars 3 forks source link

How to change the measurement mode? #9

Open BehnamRosti opened 1 year ago

BehnamRosti commented 1 year ago

With the default setting in this library, the maximum monitored lux is lower than 30,000 lx. Since BH1750 can capture up to 65535 lx, how to change the sensor configuration to LOW resolution for recording bright light?

McNerdius commented 11 months ago
import adafruit_bh1750
from adafruit_bh1750 import Resolution

bh = adafruit_bh1750.BH1750(i2c)
bh.resolution = Resolution.LOW

^ works for me