calculateLux is a ratio of VIS to IR channels with some constants thrown in. All of the calculations are done in float, but the fractional component is thrown away at the end with a cast to uint32_t. The TSL2591 is able to measure down to 188 uLux so let's make it return a float and change the example to print out some more decimals.
calculateLux is a ratio of VIS to IR channels with some constants thrown in. All of the calculations are done in float, but the fractional component is thrown away at the end with a cast to uint32_t. The TSL2591 is able to measure down to 188 uLux so let's make it return a float and change the example to print out some more decimals.