|
| 1 | +.. _adafruit_lis3dh: |
| 2 | + |
| 3 | +Adafruit LIS3DH Shield |
| 4 | +###################### |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The `Adafruit LIS3DH Triple-Axis Accelerometer Sensor Shield`_ features |
| 10 | +a `ST LIS3DH 3-axis accelerometer`_ and two STEMMA QT connectors. |
| 11 | + |
| 12 | +.. figure:: adafruit_lis3dh.webp |
| 13 | + :align: center |
| 14 | + :alt: Adafruit LIS3DH Shield |
| 15 | + |
| 16 | + Adafruit LIS3DH Shield (Credit: Adafruit) |
| 17 | + |
| 18 | + |
| 19 | +Requirements |
| 20 | +************ |
| 21 | + |
| 22 | +This shield can be used with boards which provide an I2C connector, for |
| 23 | +example STEMMA QT or Qwiic connectors. |
| 24 | +The target board must define a ``zephyr_i2c`` node label. |
| 25 | +See :ref:`shields` for more details. |
| 26 | + |
| 27 | + |
| 28 | +Pin Assignments |
| 29 | +=============== |
| 30 | + |
| 31 | ++--------------+------------------------------------------------------+ |
| 32 | +| Shield Pin | Function | |
| 33 | ++==============+======================================================+ |
| 34 | +| SDA | LIS3DH I2C SDA | |
| 35 | ++--------------+------------------------------------------------------+ |
| 36 | +| SCL | LIS3DH I2C SCL | |
| 37 | ++--------------+------------------------------------------------------+ |
| 38 | +| INT | LIS3DH Interrupt out | |
| 39 | ++--------------+------------------------------------------------------+ |
| 40 | +| SDO | LIS3DH I2C address selection. Pull down by default. | |
| 41 | ++--------------+------------------------------------------------------+ |
| 42 | +| CS | LIS3DH Force I2C mode by setting it to high level. | |
| 43 | ++--------------+------------------------------------------------------+ |
| 44 | +| I2 | LIS3DH Second interrupt out | |
| 45 | ++--------------+------------------------------------------------------+ |
| 46 | +| A1-A3 | LIS3DH Analog-to-digital converter inputs. Not used. | |
| 47 | ++--------------+------------------------------------------------------+ |
| 48 | + |
| 49 | +In order to use interrupts you need to connect a separate wire from the |
| 50 | +shield to a GPIO pin on your microcontroller board. See |
| 51 | +:dtcompatible:`st,lis3dh` for documentation on how to adjust the |
| 52 | +devicetree file. |
| 53 | + |
| 54 | + |
| 55 | +Programming |
| 56 | +*********** |
| 57 | + |
| 58 | +Set ``--shield adafruit_lis3dh`` when you invoke ``west build``. For example |
| 59 | +when running the :zephyr:code-sample:`accel_polling` sample: |
| 60 | + |
| 61 | +.. zephyr-app-commands:: |
| 62 | + :zephyr-app: samples/sensor/accel_polling |
| 63 | + :board: adafruit_qt_py_rp2040 |
| 64 | + :shield: adafruit_lis3dh |
| 65 | + :goals: build |
| 66 | + |
| 67 | +.. _Adafruit LIS3DH Triple-Axis Accelerometer Sensor Shield: |
| 68 | + https://learn.adafruit.com/adafruit-lis3dh-triple-axis-accelerometer-breakout |
| 69 | + |
| 70 | +.. _ST LIS3DH 3-axis accelerometer: |
| 71 | + https://www.st.com/en/mems-and-sensors/lis3dh.html |
0 commit comments