mirror of
https://github.com/adafruit/Adafruit_TSL2561.git
synced 2025-07-29 16:37:15 +02:00
Extended delays to take into account loose timing with 'delay'
This commit is contained in:
@ -29,6 +29,10 @@
|
||||
|
||||
#include "Adafruit_TSL2561_U.h"
|
||||
|
||||
#define TSL2561_DELAY_INTTIME_13MS (15)
|
||||
#define TSL2561_DELAY_INTTIME_101MS (120)
|
||||
#define TSL2561_DELAY_INTTIME_402MS (450)
|
||||
|
||||
/*========================================================================*/
|
||||
/* PRIVATE FUNCTIONS */
|
||||
/*========================================================================*/
|
||||
@ -140,13 +144,13 @@ void Adafruit_TSL2561_Unified::getData (uint16_t *broadband, uint16_t *ir)
|
||||
switch (_tsl2561IntegrationTime)
|
||||
{
|
||||
case TSL2561_INTEGRATIONTIME_13MS:
|
||||
delay(14);
|
||||
delay(TSL2561_DELAY_INTTIME_13MS); // KTOWN: Was 14ms
|
||||
break;
|
||||
case TSL2561_INTEGRATIONTIME_101MS:
|
||||
delay(102);
|
||||
delay(TSL2561_DELAY_INTTIME_101MS); // KTOWN: Was 102ms
|
||||
break;
|
||||
default:
|
||||
delay(403);
|
||||
delay(TSL2561_DELAY_INTTIME_402MS); // KTOWN: Was 403ms
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user