Skip to content

Commit da222c0

Browse files
authored
Merge pull request #20 from kattni/fix-up
Add version info, update cookie info
2 parents f1b9e6c + df45c84 commit da222c0

File tree

3 files changed

+53
-11
lines changed

3 files changed

+53
-11
lines changed

README.rst

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,40 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
2727
This is easily achieved by downloading
2828
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
2929

30+
Installing from PyPI
31+
=====================
32+
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
33+
PyPI <https://pypi.org/project/adafruit-circuitpython-bme680/>`_. To install for current user:
34+
35+
.. code-block:: shell
36+
37+
pip3 install adafruit-circuitpython-bme680
38+
39+
To install system-wide (this may be required in some cases):
40+
41+
.. code-block:: shell
42+
43+
sudo pip3 install adafruit-circuitpython-bme680
44+
45+
To install in a virtual environment in your current project:
46+
47+
.. code-block:: shell
48+
49+
mkdir project-name && cd project-name
50+
python3 -m venv .env
51+
source .env/bin/activate
52+
pip3 install adafruit-circuitpython-bme680
53+
3054
Usage Example
3155
=============
3256

3357
.. code-block:: python
3458
35-
import gc
3659
from busio import I2C
3760
import adafruit_bme680
3861
import time
3962
import board
4063
41-
gc.collect()
42-
print("Free mem:",gc.mem_free())
43-
4464
# Create library object using our Bus I2C port
4565
i2c = I2C(board.SCL, board.SDA)
4666
bme680 = adafruit_bme680.Adafruit_BME680_I2C(i2c)
@@ -110,4 +130,4 @@ Now, once you have the virtual environment activated:
110130
111131
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
112132
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
113-
locally verify it will pass.
133+
locally verify it will pass.

adafruit_bme680.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,29 @@
2424
# pylint: disable=too-many-instance-attributes
2525

2626
"""
27-
`adafruit_bme680` - Adafruit BME680 - Temperature, Humidity, Pressure & Gas Sensor
28-
===================================================================================
27+
`adafruit_bme680`
28+
================================================================================
2929
30-
CircuitPython driver from BME680 air quality sensor
30+
CircuitPython library for BME680 temperature, pressure and humidity sensor.
3131
32-
* Author(s): ladyada
32+
33+
* Author(s): Limor Fried
34+
35+
Implementation Notes
36+
--------------------
37+
38+
**Hardware:**
39+
40+
* `Adafruit BME680 Temp, Humidity, Pressure and Gas Sensor <https://www.adafruit.com/product/3660>`_
41+
42+
**Software and Dependencies:**
43+
44+
* Adafruit CircuitPython firmware for the supported boards:
45+
https://github.com/adafruit/circuitpython/releases
46+
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
3347
"""
3448

49+
3550
import time
3651
import math
3752
from micropython import const
@@ -40,6 +55,10 @@
4055
except ImportError:
4156
import ustruct as struct
4257

58+
__version__ = "0.0.0-auto.0"
59+
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BME680.git"
60+
61+
4362
# I2C ADDRESS/BITS/SETTINGS
4463
# -----------------------------------------------------------------------
4564
_BME680_CHIPID = const(0x61)
@@ -315,6 +334,7 @@ def _read(self, register, length):
315334
def _write(self, register, values):
316335
raise NotImplementedError()
317336

337+
318338
class Adafruit_BME680_I2C(Adafruit_BME680):
319339
"""Driver for I2C connected BME680.
320340
@@ -350,6 +370,7 @@ def _write(self, register, values):
350370
if self._debug:
351371
print("\t$%02X <= %s" % (values[0], [hex(i) for i in values[1:]]))
352372

373+
353374
class Adafruit_BME680_SPI(Adafruit_BME680):
354375
"""Driver for SPI connected BME680.
355376

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use_scm_version=True,
2424
setup_requires=['setuptools_scm'],
2525

26-
description='CircuitPython library for controlling a BME680 sensor chip.',
26+
description='CircuitPython library for BME680 temperature, pressure and humidity sensor.',
2727
long_description=long_description,
2828
long_description_content_type='text/x-rst',
2929

@@ -52,7 +52,8 @@
5252
],
5353

5454
# What does your project relate to?
55-
keywords='adafruit bme680 hardware micropython circuitpython',
55+
keywords='adafruit blinka circuitpython micropython bme680 hardware temperature pressure '
56+
'humidity gas',
5657

5758
# You can just specify the packages manually here if your project is
5859
# simple. Or you can use find_packages().

0 commit comments

Comments
 (0)