From fd9e2a04f5c9d8c540e3dbb63990c92b93d8163c Mon Sep 17 00:00:00 2001 From: brentrubell Date: Fri, 31 Aug 2018 11:45:04 -0400 Subject: [PATCH 1/2] Remove board. in README `from board import *`, so let's change board.SCL/board.SDA -> SCL/SDA --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 1119fef..5f4af83 100644 --- a/README.rst +++ b/README.rst @@ -45,7 +45,7 @@ Next, initialize the I2C bus object: .. code-block:: python from board import * - i2c_bus = busio.I2C(board.SCL, board.SDA, frequency=100000) + i2c_bus = busio.I2C(SCL, SDA, frequency=100000) Since we have the I2C bus object, we can now use it to instantiate the SGP30 object: @@ -116,4 +116,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. \ No newline at end of file +locally verify it will pass. From 7d2f794867b806471f341dd240848353b8bd829b Mon Sep 17 00:00:00 2001 From: brentru Date: Fri, 31 Aug 2018 12:32:55 -0400 Subject: [PATCH 2/2] switching to import board, instead --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5f4af83..5031bba 100644 --- a/README.rst +++ b/README.rst @@ -44,8 +44,8 @@ Next, initialize the I2C bus object: .. code-block:: python - from board import * - i2c_bus = busio.I2C(SCL, SDA, frequency=100000) + import board + i2c_bus = busio.I2C(board.SCL, board.SCL, frequency=100000) Since we have the I2C bus object, we can now use it to instantiate the SGP30 object: