From 4f542c8d0b4f61332891bf8e8deceadfd8eeeebd Mon Sep 17 00:00:00 2001 From: Bernd Giesecke Date: Sun, 10 Jan 2016 00:05:59 +0800 Subject: [PATCH] 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! --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abd25c1..ab700cb 100644 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file +Written by Kevin (KTOWN) Townsend for Adafruit Industries.