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:
Bernd Giesecke
2016-01-10 00:05:59 +08:00
parent bcb5729944
commit 4f542c8d0b

View File

@ -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 ##