ESP32 Device Driver-AP3216 Ambient Light and Proximity Sensor Driver

AP3216 Ambient Light and Proximity Sensor Driver

1. Introduction of AP3216

The AP3216C is an integrated ALS and PS module that contains a digital ambient light sensor [ALS], proximity sensor [PS], and infrared LED in a single package. This module is ideal for applications under clear or dark glass. The proximity function is specifically aimed at near-field applications, detecting external objects through a simple, configurable area controlled by registers.

The AP3216 has two photodiodes. One detects visible light and the other detects light in the infrared range. The photodiode voltage is amplified and digitized by an A/D converter. The AP3216 stores the visible light result as a 16-bit value in the ALS data register (ALS = ambient light sensor). The result of the IR measurement is stored as a 10-bit value in the IR data register.

For distance measurement, the LED emits infrared light. In addition to ambient infrared light, infrared photodiodes detect reflected radiation. From this, the AP3216 calculates the distance as a 10-bit value and stores it in the PS data register (PS = Proximity Sensor). <

Guess you like

Origin blog.csdn.net/wujuxKkoolerter/article/details/131616650