66`adafruit_bmp3xx`
77====================================================
88
9- CircuitPython driver from BMP3XX Temperature and Barometic Pressure sensor.
9+ CircuitPython driver from BMP388 Temperature and Barometric Pressure sensor.
1010
1111* Author(s): Carter Nelson
1212
@@ -75,7 +75,7 @@ def pressure(self):
7575
7676 @property
7777 def temperature (self ):
78- """The temperature in deg C. """
78+ """The temperature in degrees Celsius """
7979 return self ._read ()[1 ]
8080
8181 @property
@@ -220,8 +220,38 @@ def _write_register_byte(self, register, value):
220220
221221
222222class BMP3XX_I2C (BMP3XX ):
223- """Driver for I2C connected BMP3XX. Default address is 0x77 but another address can be passed
224- in as an argument"""
223+ """Driver for I2C connected BMP3XX.
224+
225+ :param ~busio.I2C i2c: The I2C bus the BMP388 is connected to.
226+ :param int address: I2C device address. Defaults to :const:`0x77`.
227+ but another address can be passed in as an argument
228+
229+ **Quickstart: Importing and using the BMP388**
230+
231+ Here is an example of using the :class:`BMP3XX_I2C` class.
232+ First you will need to import the libraries to use the sensor
233+
234+ .. code-block:: python
235+
236+ import board
237+ import adafruit_bmp3xx
238+
239+ Once this is done you can define your `board.I2C` object and define your sensor object
240+
241+ .. code-block:: python
242+
243+ i2c = board.I2C() # uses board.SCL and board.SDA
244+ bmp = adafruit_bmp3xx.BMP3XX_I2C(i2c)
245+
246+
247+ Now you have access to the :attr:`temperature` and :attr:`pressure` attributes
248+
249+ .. code-block:: python
250+
251+ temperature = bmp.temperature
252+ pressure = bmp.pressure
253+
254+ """
225255
226256 def __init__ (self , i2c , address = 0x77 ):
227257 import adafruit_bus_device .i2c_device as i2c_device
@@ -244,7 +274,40 @@ def _write_register_byte(self, register, value):
244274
245275
246276class BMP3XX_SPI (BMP3XX ):
247- """Driver for SPI connected BMP3XX."""
277+ """Driver for SPI connected BMP3XX.
278+
279+ :param ~busio.SPI spi: SPI device
280+ :param ~digitalio.DigitalInOut cs: Chip Select
281+
282+
283+ **Quickstart: Importing and using the BMP388**
284+
285+ Here is an example of using the :class:`BMP3XX_SPI` class.
286+ First you will need to import the libraries to use the sensor
287+
288+ .. code-block:: python
289+
290+ import board
291+ import adafruit_bmp3xx
292+ from digitalio import DigitalInOut, Direction
293+
294+ Once this is done you can define your `board.SPI` object and define your sensor object
295+
296+ .. code-block:: python
297+
298+ spi = board.SPI()
299+ cs = DigitalInOut(board.D5)
300+ bmp = adafruit_bmp3xx.BMP3XX_SPI(spi, cs)
301+
302+
303+ Now you have access to the :attr:`temperature` and :attr:`pressure` attributes
304+
305+ .. code-block:: python
306+
307+ temperature = bmp.temperature
308+ pressure = bmp.pressure
309+
310+ """
248311
249312 def __init__ (self , spi , cs ):
250313 import adafruit_bus_device .spi_device as spi_device
0 commit comments