Users can issue I2C commands for distance learning and moving calibration (background learning).
Distance learning offers three different modes:
Distance learning mode
In this mode, you need to place an object, such as a sheet of paper, at the desired distance for the product to learn. For example, if you want to set the distance to 2 cm, you must place a sheet of paper 2 cm away from the product.
After learning successfully, the maximum sensing distance and current value will be changed accordingly.
Current learning mode
If you have designed a cover made of acrylic or glass for the product, you must use this mode to learn current, keeping the current A/D value below 3072 to prevent saturation.
It is recommended to ensure a certain adjustment range when the current A/D value is below 3072, so that the A/D value can still vary as the object approaches.
Threshold (sensitivity) learning mode
If you have designed a cover made of acrylic or glass for the product, you can use this mode to configure the threshold (sensitivity).
you need to place an object, such as a sheet of paper, at the desired distance for the product to learn. For example, if you want to set the distance to 2 cm, you must place a sheet of paper 2 cm away from the product.
After learning successfully, the maximum sensing distance and threshold will be changed accordingly.
Dynamic Calibration (Background Learning) Mode
This mode is designed to eliminate sensing position shifts caused by background fluctuations, improving sensing stability and preventing measurement errors due to environmental changes (such as variations in temperature, ambient light, or background objects). Once this function is enabled (or entered via command), the product performs background learning according to the calibration cycle. If an approaching object is detected, background learning is paused; once the object leaves the sensing range, the product resumes background learning per cycle, recognizing the received optical signals as reflections from the background to dynamically calibrate for background fluctuations.