Skip to content

Commit d960c75

Browse files
author
Melissa LeBlanc-Williams
committed
Fixed I2C conflict
1 parent 401f6a2 commit d960c75

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

adafruit_featherwing/shared.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"""
3131

3232
import board
33-
import busio
34-
35-
I2C_BUS = busio.I2C(board.SCL, board.SDA)
33+
try:
34+
I2C_BUS = board.I2C()
35+
except AttributeError:
36+
import busio
37+
I2C_BUS = busio.I2C(board.SCL, board.SDA)

docs/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Ensure your device works with this simple test.
3939
:caption: examples/featherwing_matrix_simpletest.py
4040
:linenos:
4141

42-
Other Tests
43-
------------
42+
Other Examples
43+
---------------
4444

4545
.. literalinclude:: ../examples/featherwing_dotstar_palette_example.py
4646
:caption: examples/featherwing_dotstar_palette_example.py

0 commit comments

Comments
 (0)