Serial communication between the sensor and a PC for debugging. We designed an advanced algorithm which adapts to the environment when measuring reflectivity. It can detect reflective surfaces in dark, normal and bright environments.
The Ambient variable displays ambient light measured, and reflective light measured for the reflected variable. The ratio variable is the ratio that the variable "reflective" must be relative to "Ambient" to distinguish between reflective and non reflective surfaces. The variable "ratio" changes its value accordingly, it decreases in bright environments, and increases in dark environments based on an inverse relationship we had developed.
"CD" is when the program detects a reflective surface between 20 to 150 mm.