Skip to content

Commit

Permalink
Merge pull request #77 from tcfranks/main
Browse files Browse the repository at this point in the history
Proposed docstring corrections
  • Loading branch information
tekktrik committed Feb 5, 2023
2 parents 61ca587 + d96ff21 commit 240fe51
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions adafruit_lis3dh.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ class LIS3DH:
"""Driver base for the LIS3DH accelerometer.
:param digitalio.DigitalInOut int1: `digitalio.DigitalInOut` connected to
the LIS3DH INT1 interrupt pin
the LIS3DH INT interrupt pin
:param digitalio.DigitalInOut int2: `digitalio.DigitalInOut` connected to
the LIS3DH INT2 interrupt pin
the LIS3DH I2 interrupt pin (only on STEMMA QT model)
"""

def __init__(
Expand Down Expand Up @@ -440,9 +440,8 @@ def _write_register_byte(self, register: int, value: int) -> None:
class LIS3DH_SPI(LIS3DH):
"""Driver for the LIS3DH accelerometer connected over SPI.
:param ~busio.I2C i2c: The I2C bus the LIS3DH is connected to.
:param address: The I2C device address. Defaults to :const:`0x18`
:param ~busio.SPI spi: The SPI bus the LIS3DH is connected to.
:param digitalio.DigitalInOut cs: The pin connected to the LIS3DH CS pin
**Quickstart: Importing and using the device**
Expand All @@ -458,8 +457,9 @@ class LIS3DH_SPI(LIS3DH):
.. code-block:: python
i2c = board.SPI()
lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi)
spi = board.SPI()
cs = digitalio.DigitalInOut(board.D5) # Set to correct CS pin!
lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
Now you have access to the :attr:`acceleration` attribute
Expand Down

0 comments on commit 240fe51

Please sign in to comment.