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-11-12 17:13:52 +08:00
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: samples/sensors/apds9960
|
|
|
|
:board: arduino_101_sss
|
|
|
|
:goals: flash
|
|
|
|
:compact:
|
|
|
|
|
|
|
|
.. zephyr-app-commands::
|
|
|
|
:zephyr-app: tests/booting/stub
|
|
|
|
:board: arduino_101
|
|
|
|
:goals: flash
|
|
|
|
:compact:
|
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
|