Porting of Sparkfun APDS-9960 library for esp-idf framework. The original project can be found at this link
I added an extra class (I2cDevice) that you can use to port this library to another system. All i2c specific platform code is now isolated; see component folder for details.
The APDS-9960 device features advanced Gesture detection, Proximity detection, Digital Ambient Light Sense (ALS) and Color Sense (RGBC). Here a demo
This project is based on Espressif IDF v4.0 (stable branch at writing time). Follow this link to configure your environment: esp idf v4.0
Note: depending on your python virtualenv version you may encounter an error while running ESP install script (install.sh). To solve simply remove the invalid option (--no-site-packages) from idf_tools.py
The project contains a couple of examples.
- main.cpp for gesture, proximity and color sensing in polling mode.
- interrupt-gesture.cpp for gesture sensing with interrupt.
You can run 'make menuconfig' to change i2c gpio.
Esp32 Pin | APDS-9960 Board | Function |
---|---|---|
3.3V | VCC | Power |
GND | GND | Ground |
23 | SDA | I2C Data |
22 | SCL | I2C Clock |
18 | INT | Interrupt |