You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To install in a virtual environment in your current project:
105
105
@@ -108,7 +108,7 @@ To install in a virtual environment in your current project:
108
108
mkdir project-name &&cd project-name
109
109
python3 -m venv .env
110
110
source .env/bin/activate
111
-
pip3 install Sparkfun-circuitpython-qwiictwist
111
+
pip3 install sparkfun-circuitpython-qwiictwist
112
112
113
113
114
114
@@ -141,19 +141,18 @@ Usage Example
141
141
* `CircuitPython on a Raspberry Pi <https://learn.adafruit.com/circuitpython-on-raspberrypi-linux>`_ - Basic information on how to install CircuitPython on a Raspberry Pi.
142
142
* Code Example:
143
143
144
-
.. code-block:: shell
144
+
.. code-block:: shell
145
145
146
-
# import the CircuitPython board and busio libraries
147
-
import board
148
-
import busio
146
+
# import the CircuitPython board library
147
+
import board
149
148
150
-
# Create bus object using the board's I2C port
151
-
i2c = busio.I2C(board.SCL, board.SDA)
149
+
# Create bus object using the board's I2C port
150
+
i2c = board.I2C()
152
151
153
-
twist = QwiicTwist(i2c) # default address is 0x3F
152
+
twist = QwiicTwist(i2c) # default address is 0x3F
154
153
155
-
# For a different address use QwiicTwist(i2c, address)
156
-
# twist = QwiicTwist(i2c, 0x3E)
154
+
# For a different address use QwiicTwist(i2c, address)
0 commit comments