← All parts
APDS-9960 Gesture/RGB/Proximity
APDS-9960
Broadcomsensor light distance
The APDS-9960 is an integrated optical module that provides digital ambient light, RGB color, proximity, and gesture sensing capabilities, communicating via an I2C interface.
In stock
Specifications
17- Package Dimensions
- 3.94 x 2.36 x 1.35 mm
- Operating Voltage
- 2.4 to 3.6 V
- Led Supply Voltage
- 3.0 to 4.5 V
- Operating Temperature Range
- -30 to 85 C
- Storage Temperature Range
- -40 to 85 C
- Interface
- I2C
- I2c Clock Speed
- 400 kHz
- Supply Current Als Active Typ
- 200 uA
- Supply Current Proximity Active Typ
- 790 uA
- Supply Current Gesture Active Typ
- 790 uA
- Supply Current Wait State Typ
- 38 uA
- Supply Current Sleep State Typ
- 1.0 uA
- Als Color Resolution
- 16 bit
- Proximity Resolution
- 8 bit
- Gesture Resolution Per Direction
- 8 bit
- Ir Led Peak Wavelength
- 950 nm
- Device Id
- 0xAB
Pinout
8| Pin | Name | Functions | Notes |
|---|---|---|---|
| 1 | SDA | I2C | I2C serial data I/O |
| 2 | INT | GPIO | Open-drain interrupt output (active low) |
| 3 | LDR | — | LED driver input for proximity IR LED |
| 4 | LEDK | — | LED Cathode, connect to LDR for internal driver |
| 5 | LEDA | POWER | LED Anode, connect to VLEDA |
| 6 | GND | GND | Power supply ground |
| 7 | SCL | I2C | I2C serial clock input |
| 8 | VDD | POWER | Main power supply voltage |
Interactive pinout
Highlight:
APDS-9960
Click a pin to copy its name · tap a tag above to spotlight a bus.
Starter code
Community starter examples — minimal, unofficial, and provided to get you wiring fast. Verify against the manufacturer datasheet before relying on them.
Arduino (C++)
Arduino library: Adafruit APDS9960 Library
arduino
// APDS9960 color / proximity / gesture (I2C) — community starter example
#include <Adafruit_APDS9960.h>
Adafruit_APDS9960 apds;
void setup() {
Serial.begin(115200);
if (!apds.begin()) { Serial.println("APDS9960 not found"); while (1) delay(10); }
apds.enableColor(true);
}
void loop() {
uint16_t r, g, b, c;
if (apds.colorDataReady()) {
apds.getColorData(&r, &g, &b, &c);
Serial.print("R="); Serial.print(r); Serial.print(" G="); Serial.print(g);
Serial.print(" B="); Serial.println(b);
}
delay(500);
}MicroPython
MicroPython library: apds9960 (rdagger/micropython-apds9960 or port)
python
# APDS9960 (ESP32) — community starter example
# driver: an APDS9960 MicroPython port (color/proximity/gesture)
from machine import Pin, I2C
from apds9960 import APDS9960
import time
i2c = I2C(0, scl=Pin(22), sda=Pin(21))
apds = APDS9960(i2c)
apds.enable_proximity()
while True:
print("prox", apds.read_proximity())
time.sleep(0.5)Wiring
| Pin | Arduino Uno R3 | ESP32 DevKitC (WROOM-32) | Notes |
|---|---|---|---|
| VDD | +3V3 | 3V3 | 3.3 V part (Adafruit breakout accepts 3-5 V via regulator) |
| GND | GND | GND | |
| SCL | A5/SCL | GPIO22 | I2C clock |
| SDA | A4/SDA | GPIO21 | I2C data |
Typical uses
- Gesture, proximity, and RGB color sensing
- Touchless controls and ambient color