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

confused about the integration time

Open pwr33 opened this issue 1 year ago • 0 comments

just got one of your sensors, and downloaded this library

The data sheet says the integration time value is * 2.8ms which to me seems to indicate that if you set the value to 10 the actual integration time on the sensor would be 28ms

your set integration time adapter seems to multiply the value by 2.8 so in your example you set integration time to 17.857 which then after * 2.8 sets register to 50 I think, but in my opinion with the register set at 50 the integration time will be 140ms (so 280ms for mode2 all 6 colours reading)

I reckon you want to divide the set_integration_time value by 2.8 when putting it in and multiply by 2.8 getting it out

I say that because the datasheet states their tests were done with a 166ms integration time, which was what I was going to use as they must have selected it for a reason. (as usual a lot of nitty gritty missing from the datasheet, but also maybe there is extra nitty gritty in your implemetation of the circuit and firmware version, I mean it is impossible to get 166 from an 8 bit integer when multiplying by 2.8 nor by dividing by 2.8)

only way to test I guess is to do a oneshot reading and time it from start to receiving reading-ready, but will probably need to do that on a microcontroller for required timing precision....

pwr33 avatar Sep 12 '22 06:09 pwr33