We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 70334fe + c5fd5d5 commit 3790550Copy full SHA for 3790550
adafruit_tsl2591.py
@@ -244,7 +244,11 @@ def lux(self):
244
245
# Handle overflow.
246
if channel_0 >= max_counts or channel_1 >= max_counts:
247
- raise RuntimeError("Overflow reading light channels!")
+ message = (
248
+ "Overflow reading light channels!, Try to reduce the gain of\n "
249
+ + "the sensor using adafruit_tsl2591.GAIN_LOW"
250
+ )
251
+ raise RuntimeError(message)
252
# Calculate lux using same equation as Arduino library:
253
# https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.cpp
254
again = 1.0
0 commit comments