Merge pull request #20 from kattni/fix-up
Add version info, update cookie info
This commit is contained in:
commit
da222c0163
3 changed files with 53 additions and 11 deletions
30
README.rst
30
README.rst
|
|
@ -27,20 +27,40 @@ Please ensure all dependencies are available on the CircuitPython filesystem.
|
|||
This is easily achieved by downloading
|
||||
`the Adafruit library and driver bundle <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_.
|
||||
|
||||
Installing from PyPI
|
||||
=====================
|
||||
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
|
||||
PyPI <https://pypi.org/project/adafruit-circuitpython-bme680/>`_. To install for current user:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
pip3 install adafruit-circuitpython-bme680
|
||||
|
||||
To install system-wide (this may be required in some cases):
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
sudo pip3 install adafruit-circuitpython-bme680
|
||||
|
||||
To install in a virtual environment in your current project:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
mkdir project-name && cd project-name
|
||||
python3 -m venv .env
|
||||
source .env/bin/activate
|
||||
pip3 install adafruit-circuitpython-bme680
|
||||
|
||||
Usage Example
|
||||
=============
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import gc
|
||||
from busio import I2C
|
||||
import adafruit_bme680
|
||||
import time
|
||||
import board
|
||||
|
||||
gc.collect()
|
||||
print("Free mem:",gc.mem_free())
|
||||
|
||||
# Create library object using our Bus I2C port
|
||||
i2c = I2C(board.SCL, board.SDA)
|
||||
bme680 = adafruit_bme680.Adafruit_BME680_I2C(i2c)
|
||||
|
|
@ -110,4 +130,4 @@ Now, once you have the virtual environment activated:
|
|||
|
||||
This will output the documentation to ``docs/_build/html``. Open the index.html in your browser to
|
||||
view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to
|
||||
locally verify it will pass.
|
||||
locally verify it will pass.
|
||||
|
|
|
|||
|
|
@ -24,14 +24,29 @@
|
|||
# pylint: disable=too-many-instance-attributes
|
||||
|
||||
"""
|
||||
`adafruit_bme680` - Adafruit BME680 - Temperature, Humidity, Pressure & Gas Sensor
|
||||
===================================================================================
|
||||
`adafruit_bme680`
|
||||
================================================================================
|
||||
|
||||
CircuitPython driver from BME680 air quality sensor
|
||||
CircuitPython library for BME680 temperature, pressure and humidity sensor.
|
||||
|
||||
* Author(s): ladyada
|
||||
|
||||
* Author(s): Limor Fried
|
||||
|
||||
Implementation Notes
|
||||
--------------------
|
||||
|
||||
**Hardware:**
|
||||
|
||||
* `Adafruit BME680 Temp, Humidity, Pressure and Gas Sensor <https://www.adafruit.com/product/3660>`_
|
||||
|
||||
**Software and Dependencies:**
|
||||
|
||||
* Adafruit CircuitPython firmware for the supported boards:
|
||||
https://github.com/adafruit/circuitpython/releases
|
||||
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
|
||||
"""
|
||||
|
||||
|
||||
import time
|
||||
import math
|
||||
from micropython import const
|
||||
|
|
@ -40,6 +55,10 @@ try:
|
|||
except ImportError:
|
||||
import ustruct as struct
|
||||
|
||||
__version__ = "0.0.0-auto.0"
|
||||
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BME680.git"
|
||||
|
||||
|
||||
# I2C ADDRESS/BITS/SETTINGS
|
||||
# -----------------------------------------------------------------------
|
||||
_BME680_CHIPID = const(0x61)
|
||||
|
|
@ -315,6 +334,7 @@ class Adafruit_BME680:
|
|||
def _write(self, register, values):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
class Adafruit_BME680_I2C(Adafruit_BME680):
|
||||
"""Driver for I2C connected BME680.
|
||||
|
||||
|
|
@ -350,6 +370,7 @@ class Adafruit_BME680_I2C(Adafruit_BME680):
|
|||
if self._debug:
|
||||
print("\t$%02X <= %s" % (values[0], [hex(i) for i in values[1:]]))
|
||||
|
||||
|
||||
class Adafruit_BME680_SPI(Adafruit_BME680):
|
||||
"""Driver for SPI connected BME680.
|
||||
|
||||
|
|
|
|||
5
setup.py
5
setup.py
|
|
@ -23,7 +23,7 @@ setup(
|
|||
use_scm_version=True,
|
||||
setup_requires=['setuptools_scm'],
|
||||
|
||||
description='CircuitPython library for controlling a BME680 sensor chip.',
|
||||
description='CircuitPython library for BME680 temperature, pressure and humidity sensor.',
|
||||
long_description=long_description,
|
||||
long_description_content_type='text/x-rst',
|
||||
|
||||
|
|
@ -52,7 +52,8 @@ setup(
|
|||
],
|
||||
|
||||
# What does your project relate to?
|
||||
keywords='adafruit bme680 hardware micropython circuitpython',
|
||||
keywords='adafruit blinka circuitpython micropython bme680 hardware temperature pressure '
|
||||
'humidity gas',
|
||||
|
||||
# You can just specify the packages manually here if your project is
|
||||
# simple. Or you can use find_packages().
|
||||
|
|
|
|||
Loading…
Reference in a new issue