Color Sensor Settings¶
Integration Period¶
The integration period of the sensor is how long it reads light for.
The sensor operates similarly to a camera, detecting light that hits the sensor over a given period of time. Therefore, the integration period is similar to exposure time.
Longer integration times will be slightly more stable and have slightly longer range, at the tradeoff of slower reads. The default of 25ms is generally a good tradeoff between stability and speed.
Important
Although there is an integration period option of 3ms, the sensor itself will still only update at 25ms when this option is set. This lower exposure time is useful if the sensor is being used in an environment with a high amount of light.
//Sets the integration period to 20 ms
settings.setColorIntegrationPeriod(ColorPeriod.k25ms);
//Sets the integration period to 20 ms
settings.SetColorIntegrationPeriod(ColorPeriod::k25ms);