Skip to content

Commit 8f13129

Browse files
pyhyshenrikbrixandersen
authored andcommitted
boards: shields: Add Adafruit LTR-329 light sensor shield
The product photo is from https://learn.adafruit.com/assets/115230 Tested with the commmand mentioned in the index.rst file. Compilation testing in CI of the overlay file is done via the light_polling sample. Signed-off-by: Jonas Berg <[email protected]>
1 parent 7476c52 commit 8f13129

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-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_LTR329
5+
def_bool $(shields_list_contains,adafruit_ltr329)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 Jonas Berg
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
light-sensor = &adafruit_ltr329;
10+
};
11+
};
12+
13+
&zephyr_i2c {
14+
status = "okay";
15+
16+
adafruit_ltr329: ltr329@29 {
17+
compatible = "liteon,ltr329";
18+
reg = <0x29>;
19+
};
20+
};
41.2 KB
Loading
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
.. _adafruit_ltr329:
2+
3+
Adafruit LTR-329 Shield
4+
#######################
5+
6+
7+
Overview
8+
********
9+
10+
The `Adafruit LTR-329 Light Sensor Shield`_ features a `LiteOn LTR-329ALS-01 Digital Light Sensor`_
11+
and two STEMMA QT connectors.
12+
13+
.. figure:: adafruit_ltr329.webp
14+
:align: center
15+
:alt: Adafruit LTR-329 Shield
16+
17+
Adafruit LTR-329 Shield (Credit: Adafruit)
18+
19+
20+
Requirements
21+
************
22+
23+
This shield can be used with boards which provide an I2C connector, for example STEMMA QT or
24+
Qwiic connectors. The target board must define a ``zephyr_i2c`` node label. See :ref:`shields` for
25+
more details.
26+
27+
28+
Pin Assignments
29+
===============
30+
31+
+--------------+-----------------------+
32+
| Shield Pin | Function |
33+
+==============+=======================+
34+
| SDA | LTR-329 I2C SDA |
35+
+--------------+-----------------------+
36+
| SCL | LTR-329 I2C SCL |
37+
+--------------+-----------------------+
38+
39+
See :dtcompatible:`liteon,ltr329` for documentation on how to adjust the devicetree file, to for
40+
example adjust the integration time.
41+
42+
43+
Programming
44+
***********
45+
46+
Set ``--shield adafruit_ltr329`` when you invoke ``west build``. For example when running the
47+
:zephyr:code-sample:`light_sensor_polling` light measurement sample:
48+
49+
.. zephyr-app-commands::
50+
:zephyr-app: samples/sensor/light_polling
51+
:board: adafruit_metro_rp2040
52+
:shield: adafruit_ltr329
53+
:goals: build
54+
55+
.. _Adafruit LTR-329 Light Sensor Shield:
56+
https://learn.adafruit.com/adafruit-ltr-329-ltr-303
57+
58+
.. _LiteOn LTR-329ALS-01 Digital Light Sensor:
59+
https://optoelectronics.liteon.com/upload/download/DS86-2014-0006/LTR-329ALS-01_DS_V1.8.PDF
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_ltr329
7+
full_name: Adafruit LTR-329 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
@@ -31,14 +31,17 @@ tests:
3131
- adafruit_feather_canbus_rp2040/rp2040
3232
- mikroe_clicker_ra4m1/r7fa4m1ab3cfm
3333
- mikroe_quail/stm32f427xx
34+
- adafruit_metro_rp2040/rp2040
3435
platform_allow:
3536
- frdm_mcxw71/mcxw716c
3637
- adafruit_qt_py_rp2040/rp2040 # adafruit_tsl2591 shield
3738
- adafruit_feather_canbus_rp2040/rp2040 # adafruit_veml7700 shield
3839
- mikroe_clicker_ra4m1/r7fa4m1ab3cfm # mikroe_ambient_2_click shield
3940
- mikroe_quail/stm32f427xx # mikroe_illuminance_click shield
41+
- adafruit_metro_rp2040/rp2040 # adafruit_ltr329 shield
4042
extra_args:
4143
- platform:adafruit_qt_py_rp2040/rp2040:SHIELD="adafruit_tsl2591"
4244
- platform:adafruit_feather_canbus_rp2040/rp2040:SHIELD="adafruit_veml7700"
4345
- platform:mikroe_clicker_ra4m1/r7fa4m1ab3cfm:SHIELD="mikroe_ambient_2_click"
4446
- platform:mikroe_quail/stm32f427xx:SHIELD="mikroe_illuminance_click"
47+
- platform:adafruit_metro_rp2040/rp2040:SHIELD="adafruit_ltr329"

0 commit comments

Comments
 (0)