1.. zephyr:code-sample:: isl29035 2 :name: ISL29035 Digital Light Sensor 3 :relevant-api: sensor_interface 4 5 Get light intensity data from an ISL29035 sensor (polling & trigger mode). 6 7Overview 8******** 9 10If trigger is not enabled the sample displays measured light intensity 11every 2 seconds. 12 13If trigger is enabled the sample displays light intensity from the 14ISL29035 sensor every 10 seconds if it is within +/- 50 lux of the last 15read sample. If the sensor detects an intensity outside that range the 16application wakes, displays the intensity, resets the intensity range 17window to center on the new value, then continues as before. 18 19Requirements 20************ 21 22This sample uses an external breakout for the sensor. A devicetree 23overlay must be provided to connect the sensor to the I2C bus and 24identify the interrupt signal. 25 26Building and Running 27******************** 28 29.. zephyr-app-commands:: 30 :zephyr-app: samples/sensor/isl29035 31 :board: nrf52dk/nrf52832 32 :goals: build 33 :compact: 34 35Sample Output 36============= 37 38.. code-block:: console 39 40 *** Booting Zephyr OS build zephyr-v2.1.0-335-gfe020d937d43 *** 41 ALERT 365 lux outside range centered on 0 lux. 42 Next alert outside 315 .. 415 43 [0:00:00.018] Ambient light sense: 365.234 44 [0:00:10.023] Ambient light sense: 361.084 45 ALERT 302 lux outside range centered on 365 lux. 46 Next alert outside 252 .. 352 47 [0:00:13.276] Ambient light sense: 302.734 48 ALERT 247 lux outside range centered on 302 lux. 49 Next alert outside 197 .. 297 50 [0:00:14.619] Ambient light sense: 247.62 51 ALERT 187 lux outside range centered on 247 lux. 52 Next alert outside 137 .. 237 53 [0:00:16.141] Ambient light sense: 187.927 54 ALERT 126 lux outside range centered on 187 lux. 55 Next alert outside 76 .. 176 56 [0:00:16.410] Ambient light sense: 126.953 57 ALERT 181 lux outside range centered on 126 lux. 58 Next alert outside 131 .. 231 59 [0:00:17.843] Ambient light sense: 181.03 60 ALERT 235 lux outside range centered on 181 lux. 61 Next alert outside 185 .. 285 62 [0:00:18.022] Ambient light sense: 235.779 63 ALERT 301 lux outside range centered on 235 lux. 64 Next alert outside 251 .. 351 65 [0:00:23.126] Ambient light sense: 301.758 66 ALERT 353 lux outside range centered on 301 lux. 67 Next alert outside 303 .. 403 68 [0:00:23.305] Ambient light sense: 353.333 69 [0:00:33.310] Ambient light sense: 365.112 70 71 <repeats as necessary> 72