Skip to content

Commit 094cb9b

Browse files
authored
Merge pull request #15 from fourstix/b_fix_typos
Updated example code and fix typos
2 parents 72bc882 + 6a035a6 commit 094cb9b

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ To install for current user:
9393

9494
.. code-block:: shell
9595
96-
pip3 install Sparkfun-circuitpython-qwiictwist
96+
pip3 install sparkfun-circuitpython-qwiictwist
9797
9898
To install system-wide (this may be required in some cases):
9999

100100
.. code-block:: shell
101101
102-
sudo pip3 install Sparkfun-circuitpython-qwiictwist
102+
sudo pip3 install sparkfun-circuitpython-qwiictwist
103103
104104
To install in a virtual environment in your current project:
105105

@@ -108,7 +108,7 @@ To install in a virtual environment in your current project:
108108
mkdir project-name && cd project-name
109109
python3 -m venv .env
110110
source .env/bin/activate
111-
pip3 install Sparkfun-circuitpython-qwiictwist
111+
pip3 install sparkfun-circuitpython-qwiictwist
112112
113113
114114
@@ -141,19 +141,18 @@ Usage Example
141141
* `CircuitPython on a Raspberry Pi <https://learn.adafruit.com/circuitpython-on-raspberrypi-linux>`_ - Basic information on how to install CircuitPython on a Raspberry Pi.
142142
* Code Example:
143143

144-
.. code-block:: shell
144+
.. code-block:: shell
145145
146-
# import the CircuitPython board and busio libraries
147-
import board
148-
import busio
146+
# import the CircuitPython board library
147+
import board
149148
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()
152151
153-
twist = QwiicTwist(i2c) # default address is 0x3F
152+
twist = QwiicTwist(i2c) # default address is 0x3F
154153
155-
# For a different address use QwiicTwist(i2c, address)
156-
# twist = QwiicTwist(i2c, 0x3E)
154+
# For a different address use QwiicTwist(i2c, address)
155+
# twist = QwiicTwist(i2c, 0x3E)
157156
158157
Contributing
159158
============

0 commit comments

Comments
 (0)