Skip to content

Commit 81dc0ec

Browse files
pyhyskartben
authored andcommitted
boards: shields: Add Adafruit VEML7700 light sensor shield
Product photo from https://learn.adafruit.com/assets/122469, which has the CC BY-SA 3.0 license. Tested with the command mentioned in the index.rst page. Signed-off-by: Jonas Berg <[email protected]>
1 parent 6b809c2 commit 81dc0ec

File tree

6 files changed

+101
-0
lines changed

6 files changed

+101
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Jonas Berg
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_ADAFRUIT_VEML7700
5+
def_bool $(shields_list_contains,adafruit_veml7700)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2025 Jonas Berg
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
light-sensor = &adafruit_veml7700;
10+
};
11+
};
12+
13+
&zephyr_i2c {
14+
status = "okay";
15+
16+
adafruit_veml7700: veml7700@10 {
17+
status = "okay";
18+
compatible = "vishay,veml7700";
19+
reg = <0x10>;
20+
};
21+
};
37.2 KB
Loading
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.. _adafruit_veml7700:
2+
3+
Adafruit VEML7700 Shield
4+
########################
5+
6+
Overview
7+
********
8+
9+
The `Adafruit VEML7700 Lux Sensor Shield`_ features
10+
a `Vishay VEML7700 High Accuracy Ambient Light Sensor`_ and two STEMMA QT connectors.
11+
It measures ambient light in the range 0 to 140000 lx. There are two versions of the
12+
sensor; top view and side view.
13+
Adafruit sells both versions, and this shield definition can be used with both.
14+
15+
.. figure:: adafruit_veml7700.webp
16+
:align: center
17+
:alt: Adafruit VEML7700 Shield
18+
19+
Adafruit VEML7700 shield, top view version (Credit: Adafruit)
20+
21+
22+
Requirements
23+
************
24+
25+
This shield can be used with boards which provide an I2C connector, for
26+
example STEMMA QT or Qwiic connectors.
27+
The target board must define a ``zephyr_i2c`` node label.
28+
See :ref:`shields` for more details.
29+
30+
31+
Pin Assignments
32+
===============
33+
34+
+--------------+-------------------+
35+
| Shield Pin | Function |
36+
+==============+===================+
37+
| SDA | VEML7700 I2C SDA |
38+
+--------------+-------------------+
39+
| SCL | VEML7700 I2C SCL |
40+
+--------------+-------------------+
41+
42+
See :dtcompatible:`vishay,veml7700` for documentation on how to adjust the
43+
devicetree file, for example to use power saving mode.
44+
45+
46+
Programming
47+
***********
48+
49+
Set ``--shield adafruit_veml7700`` when you invoke ``west build``. For example
50+
when running the :zephyr:code-sample:`light_sensor_polling` sample:
51+
52+
.. zephyr-app-commands::
53+
:zephyr-app: samples/sensor/light_polling
54+
:board: adafruit_qt_py_rp2040
55+
:shield: adafruit_veml7700
56+
:goals: build
57+
58+
.. _Adafruit VEML7700 Lux Sensor Shield:
59+
https://learn.adafruit.com/adafruit-veml7700
60+
61+
.. _Vishay VEML7700 High Accuracy Ambient Light Sensor:
62+
https://www.vishay.com/en/product/84286/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
#
3+
# Copyright (c) 2025, Jonas Berg
4+
5+
shield:
6+
name: adafruit_veml7700
7+
full_name: Adafruit VEML7700 Light Sensor Shield
8+
vendor: adafruit
9+
supported_features:
10+
- sensor

samples/sensor/light_polling/sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,17 @@ tests:
2828
integration_platforms:
2929
- frdm_mcxw71/mcxw716c
3030
- adafruit_qt_py_rp2040/rp2040
31+
- adafruit_feather_canbus_rp2040/rp2040
3132
- mikroe_clicker_ra4m1/r7fa4m1ab3cfm
3233
- mikroe_quail/stm32f427xx
3334
platform_allow:
3435
- frdm_mcxw71/mcxw716c
3536
- adafruit_qt_py_rp2040/rp2040 # adafruit_tsl2591 shield
37+
- adafruit_feather_canbus_rp2040/rp2040 # adafruit_veml7700 shield
3638
- mikroe_clicker_ra4m1/r7fa4m1ab3cfm # mikroe_ambient_2_click shield
3739
- mikroe_quail/stm32f427xx # mikroe_illuminance_click shield
3840
extra_args:
3941
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="adafruit_tsl2591"
42+
- platform:adafruit_feather_canbus_rp2040/rp2040:SHIELD="adafruit_veml7700"
4043
- platform:mikroe_clicker_ra4m1/r7fa4m1ab3cfm:SHIELD="mikroe_ambient_2_click"
4144
- platform:mikroe_quail/stm32f427xx:SHIELD="mikroe_illuminance_click"

0 commit comments

Comments
 (0)