@@ -94,13 +94,13 @@ To install for current user:
94
94
95
95
.. code-block :: shell
96
96
97
- pip3 install Sparkfun -circuitpython-qwiicjoystick
97
+ pip3 install sparkfun -circuitpython-qwiicjoystick
98
98
99
99
To install system-wide (this may be required in some cases):
100
100
101
101
.. code-block :: shell
102
102
103
- sudo pip3 install Sparkfun -circuitpython-qwiicjoystick
103
+ sudo pip3 install sparkfun -circuitpython-qwiicjoystick
104
104
105
105
To install in a virtual environment in your current project:
106
106
@@ -109,7 +109,7 @@ To install in a virtual environment in your current project:
109
109
mkdir project-name && cd project-name
110
110
python3 -m venv .env
111
111
source .env/bin/activate
112
- pip3 install Sparkfun -circuitpython-qwiicjoystick
112
+ pip3 install sparkfun -circuitpython-qwiicjoystick
113
113
114
114
115
115
@@ -144,19 +144,18 @@ Usage Example
144
144
145
145
* Code Example:
146
146
147
- .. code-block :: shell
147
+ .. code-block :: shell
148
148
149
- # import the CircuitPython board and busio libraries
150
- import board
151
- import busio
149
+ # import the CircuitPython board and busio libraries
150
+ import board
152
151
153
- # Create bus object using the board's I2C port
154
- i2c = busio .I2C(board.SCL, board.SDA )
152
+ # Create bus object using the board's I2C port
153
+ i2c = board .I2C ()
155
154
156
- joystick = QwiicJoystick(i2c) # default address is 0x20
155
+ joystick = QwiicJoystick(i2c) # default address is 0x20
157
156
158
- # use QwiicJoystick(i2c, address) for a different address
159
- # joystick = QwiicJoystick(i2c, 0x21)"""
157
+ # use QwiicJoystick(i2c, address) for a different address
158
+ # joystick = QwiicJoystick(i2c, 0x21)"""
160
159
161
160
Contributing
162
161
============
0 commit comments