forked from adafruit/Adafruit_TSL2561
Changed return value of getEvent
value of 0 could be a valid value in darkness, better to return a value > 65535 to report saturation and return false from getEvent in that case!
This commit is contained in:
@ -9,7 +9,7 @@ tsl.setGain(TSL2561_GAIN_16X); /* 16x gain ... use in low light to boost sen
|
||||
tsl.enableAutoGain(true); /* Auto-gain ... switches automatically between 1x and 16x */
|
||||
```
|
||||
|
||||
The driver also supports as automatic clipping detection, and will return '0' lux when the sensor is saturated and data is unreliable.
|
||||
The driver also supports as automatic clipping detection, and will return '65536' lux when the sensor is saturated and data is unreliable. tsl.getEvent will return false in case of saturation and true in case of valid light data.
|
||||
|
||||
## About the TSL2561 ##
|
||||
|
||||
@ -44,4 +44,4 @@ Light sensors will always report units in lux, gyroscopes will always report uni
|
||||
|
||||
Adafruit invests time and resources providing this open source code. Please support Adafruit and open-source hardware by purchasing products from Adafruit!
|
||||
|
||||
Written by Kevin (KTOWN) Townsend for Adafruit Industries.
|
||||
Written by Kevin (KTOWN) Townsend for Adafruit Industries.
|
||||
|
Reference in New Issue
Block a user