2017-06-12 13:57:21 +08:00
|
|
|
.. _apds9960:
|
2017-04-05 03:13:21 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
APDS9960 RGB, Ambient Light, Gesture Sensor
|
|
|
|
###########################################
|
2017-01-11 00:58:06 +08:00
|
|
|
|
|
|
|
Overview
|
2017-01-21 07:58:05 +08:00
|
|
|
********
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
This sample application demonstrates how to use the APDS9960 sensor to get
|
|
|
|
ambient light, RGB, and proximity (or gesture) data. This sample checks the
|
|
|
|
sensor in polling mode (without an interrupt trigger).
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
Building and Running
|
|
|
|
********************
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
This sample application uses an APDS9960 sensor connected to an Arduino 101 board
|
|
|
|
(for example as shown in this
|
|
|
|
`Sparkfun APDS9960 tutorial`_).
|
|
|
|
There are two processor cores (x86 and ARC) on the Arduino 101. You'll need to flash
|
|
|
|
both this sample's code on the ARC core (using the ``arduino101_sss`` board target),
|
|
|
|
and stub code on the x86 core (using the ``arduino_101`` board target), as shown below:
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
.. code-block:: console
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
$ cd $ZEPHYR_BASE/samples/sensors/apds9960
|
|
|
|
$ make BOARD=arduino_101_sss flash
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
$ cd $ZEPHYR_BASE/tests/booting/stub
|
|
|
|
$ make BOARD=arduino_101 flash
|
2017-01-11 00:58:06 +08:00
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
Sample Output
|
|
|
|
=============
|
2017-01-11 00:58:06 +08:00
|
|
|
|
|
|
|
.. code-block:: console
|
|
|
|
|
2017-06-12 13:57:21 +08:00
|
|
|
ambient light intensity without trigger is 387
|
|
|
|
proxy without trigger is 115
|
|
|
|
ambient light intensity without trigger is 386
|
|
|
|
proxy without trigger is 112
|
|
|
|
ambient light intensity without trigger is 386
|
|
|
|
|
|
|
|
.. _Sparkfun APDS9960 tutorial: https://www.sparkfun.com/products/12787
|