1.. zephyr:code-sample:: grove_light
2   :name: Grove Light Sensor
3   :relevant-api: sensor_interface
4
5   Get illuminance data from a Grove Light Sensor.
6
7Overview
8********
9
10This sample application gets the output of the grove light sensor and prints it to the console, in
11units of lux, once every second.
12
13Requirements
14************
15
16To use this sample, the following hardware is required:
17
18* A board with ADC support
19* `Grove Light Sensor`_
20* `Grove Base Shield`_
21
22Wiring
23******
24
25The easiest way to connect the sensor is to connect it to a Grove shield on a board that supports
26Arduino shields. Provide a devicetree overlay that specifies the sensor location. If using the
27overlay provided for the sample, the sensor should be connected to A0 on the Grove shield.
28
29Building and Running
30********************
31
32Build and flash the sample as follows, changing ``nrf52dk_nrf52832`` to your board:
33
34.. zephyr-app-commands::
35   :zephyr-app: samples/sensor/grove_light
36   :board: nrf52dk_nrf52832
37   :goals: build flash
38   :compact:
39
40Sample Output
41=============
42
43.. code-block:: console
44
45    *** Booting Zephyr OS build v3.6.0-rc1-32-gba639ed6a893 ***
46    lux: 0.945751
47    lux: 0.882292
48    lux: 0.755973
49
50.. _Grove Base Shield: https://wiki.seeedstudio.com/Base_Shield_V2/
51.. _Grove Light Sensor: https://wiki.seeedstudio.com/Grove-Light_Sensor/
52