@@ -284,36 +284,36 @@ class Adafruit_BME280_I2C(Adafruit_BME280_Advanced):
284
284
285
285
**Quickstart: Importing and using the BME280**
286
286
287
- Here is an example of using the :class:`Adafruit_BME280_I2C`.
288
- First you will need to import the libraries to use the sensor
287
+ Here is an example of using the :class:`Adafruit_BME280_I2C`.
288
+ First you will need to import the libraries to use the sensor
289
289
290
- .. code-block:: python
290
+ .. code-block:: python
291
291
292
- import board
293
- import adafruit_bme280.advanced as adafruit_bme280
292
+ import board
293
+ import adafruit_bme280.advanced as adafruit_bme280
294
294
295
- Once this is done you can define your `board.I2C` object and define your sensor object
295
+ Once this is done you can define your `board.I2C` object and define your sensor object
296
296
297
- .. code-block:: python
297
+ .. code-block:: python
298
298
299
- i2c = board.I2C() # uses board.SCL and board.SDA
300
- bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)
299
+ i2c = board.I2C() # uses board.SCL and board.SDA
300
+ bme280 = adafruit_bme280.Adafruit_BME280_I2C(i2c)
301
301
302
- You need to setup the pressure at sea level
302
+ You need to setup the pressure at sea level
303
303
304
- .. code-block:: python
304
+ .. code-block:: python
305
305
306
- bme280.sea_level_pressure = 1013.25
306
+ bme280.sea_level_pressure = 1013.25
307
307
308
- Now you have access to the :attr:`temperature`, :attr:`relative_humidity`
309
- :attr:`pressure` and :attr:`altitude` attributes
308
+ Now you have access to the :attr:`temperature`, :attr:`relative_humidity`
309
+ :attr:`pressure` and :attr:`altitude` attributes
310
310
311
- .. code-block:: python
311
+ .. code-block:: python
312
312
313
- temperature = bme280.temperature
314
- relative_humidity = bme280.relative_humidity
315
- pressure = bme280.pressure
316
- altitude = bme280.altitude
313
+ temperature = bme280.temperature
314
+ relative_humidity = bme280.relative_humidity
315
+ pressure = bme280.pressure
316
+ altitude = bme280.altitude
317
317
318
318
"""
319
319
@@ -334,38 +334,38 @@ class Adafruit_BME280_SPI(Adafruit_BME280_Advanced):
334
334
335
335
**Quickstart: Importing and using the BME280**
336
336
337
- Here is an example of using the :class:`Adafruit_BME280_SPI` class.
338
- First you will need to import the libraries to use the sensor
337
+ Here is an example of using the :class:`Adafruit_BME280_SPI` class.
338
+ First you will need to import the libraries to use the sensor
339
339
340
- .. code-block:: python
340
+ .. code-block:: python
341
341
342
- import board
343
- from digitalio import DigitalInOut
344
- import adafruit_bme280.advanced as adafruit_bme280
342
+ import board
343
+ from digitalio import DigitalInOut
344
+ import adafruit_bme280.advanced as adafruit_bme280
345
345
346
- Once this is done you can define your `board.SPI` object and define your sensor object
346
+ Once this is done you can define your `board.SPI` object and define your sensor object
347
347
348
- .. code-block:: python
348
+ .. code-block:: python
349
349
350
- cs = digitalio.DigitalInOut(board.D10)
351
- spi = board.SPI()
352
- bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, cs)
350
+ cs = digitalio.DigitalInOut(board.D10)
351
+ spi = board.SPI()
352
+ bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, cs)
353
353
354
- You need to setup the pressure at sea level
354
+ You need to setup the pressure at sea level
355
355
356
- .. code-block:: python
356
+ .. code-block:: python
357
357
358
- bme280.sea_level_pressure = 1013.25
358
+ bme280.sea_level_pressure = 1013.25
359
359
360
- Now you have access to the :attr:`temperature`, :attr:`relative_humidity`
361
- :attr:`pressure` and :attr:`altitude` attributes
360
+ Now you have access to the :attr:`temperature`, :attr:`relative_humidity`
361
+ :attr:`pressure` and :attr:`altitude` attributes
362
362
363
- .. code-block:: python
363
+ .. code-block:: python
364
364
365
- temperature = bme280.temperature
366
- relative_humidity = bme280.relative_humidity
367
- pressure = bme280.pressure
368
- altitude = bme280.altitude
365
+ temperature = bme280.temperature
366
+ relative_humidity = bme280.relative_humidity
367
+ pressure = bme280.pressure
368
+ altitude = bme280.altitude
369
369
370
370
"""
371
371
0 commit comments