python-tsl2591 icon indicating copy to clipboard operation
python-tsl2591 copied to clipboard

integration_time plus **1** second (fixed) blocked reliable measures

Open elemhsb opened this issue 5 years ago • 1 comments

https://github.com/maxlklaxl/python-tsl2591/blob/290ef844d8a939eb6674f241f0b17af8667764c0/tsl2591/read_tsl.py#L158

Typo here: () missing time.sleep(0.120self.integration_time+1) # takes minimal 1 second + 0.120self.integration_time

You want: time.sleep(0.120*(self.integration_time+1))

Fastest working is: time.sleep(0.105+0.100*self.integration)

elemhsb avatar Mar 01 '19 10:03 elemhsb

Seconded! I use a local copy of this helpful repository and fixed it there but never reported here, sorry...

The initial clue for that comes form the official Adafruit driver and datasheet: https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.cpp#L316-L320 in combination with https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/Adafruit_TSL2591.h#L84

cmur2 avatar Mar 01 '19 11:03 cmur2