File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,23 @@ Usage Example
154
154
# For a different address use QwiicRelay(i2c, address)
155
155
# relay = QwiicRelay(i2c, 0x19)
156
156
157
+ Upgrading
158
+ =========
159
+ On supported GNU/Linux systems like the Raspberry Pi, you can upgrade the driver locally `from
160
+ PyPI <https://pypi.org/project/Sparkfun-circuitpython-qwiicjoystick/> `_.
161
+
162
+ To upgrade for current user:
163
+
164
+ .. code-block :: shell
165
+
166
+ pip3 install --upgrade sparkfun-circuitpython-qwiicjoystick
167
+
168
+ To upgrade system-wide (this may be required in some cases):
169
+
170
+ .. code-block :: shell
171
+
172
+ sudo pip3 install --upgrade sparkfun-circuitpython-qwiicjoystick
173
+
157
174
Contributing
158
175
============
159
176
Original file line number Diff line number Diff line change @@ -164,8 +164,11 @@ def set_i2c_address(self, new_address):
164
164
def _read_command (self , command , count ):
165
165
# Send a command then read count number of bytes.
166
166
with self ._device as device :
167
+ device .write (bytes ([command ]))
167
168
result = bytearray (count )
168
- device .write_then_readinto (bytes ([command ]), result )
169
+ device .readinto (result )
170
+ # write_then_readinto function does not see to work
171
+ # device.write_then_readinto(bytes([command]), result)
169
172
if self ._debug :
170
173
print ("$%02X => %s" % (command , [hex (i ) for i in result ]))
171
174
return result
You can’t perform that action at this time.
0 commit comments