Skip to content

Commit a30db73

Browse files
authored
Merge pull request #20 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 4d60450 + 2d330be commit a30db73

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

examples/is31fl3741_animation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
from adafruit_is31fl3741.adafruit_ledglasses import MUST_BUFFER, LED_Glasses
1212
from adafruit_is31fl3741.led_glasses_animation import LED_Glasses_Animation
1313

14-
glasses = LED_Glasses(board.I2C(), allocate=MUST_BUFFER)
14+
i2c = board.I2C() # uses board.SCL and board.SDA
15+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
16+
glasses = LED_Glasses(i2c, allocate=MUST_BUFFER)
1517
glasses.set_led_scaling(255)
1618
glasses.global_current = 0xFE
1719
glasses.enable = True

examples/is31fl3741_glassesrings.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
from adafruit_is31fl3741.adafruit_ledglasses import LED_Glasses
77
import adafruit_is31fl3741
88

9-
glasses = LED_Glasses(board.I2C(), allocate=adafruit_is31fl3741.MUST_BUFFER)
9+
i2c = board.I2C() # uses board.SCL and board.SDA
10+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
11+
glasses = LED_Glasses(i2c, allocate=adafruit_is31fl3741.MUST_BUFFER)
1012

1113
wheeloffset = 0
1214
while True:

examples/is31fl3741_rgbswirl.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from adafruit_is31fl3741.adafruit_rgbmatrixqt import Adafruit_RGBMatrixQT
88
import adafruit_is31fl3741
99

10-
is31 = Adafruit_RGBMatrixQT(board.I2C(), allocate=adafruit_is31fl3741.PREFER_BUFFER)
10+
i2c = board.I2C() # uses board.SCL and board.SDA
11+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
12+
is31 = Adafruit_RGBMatrixQT(i2c, allocate=adafruit_is31fl3741.PREFER_BUFFER)
1113
is31.set_led_scaling(0xFF)
1214
is31.global_current = 0xFF
1315
# print("Global current is: ", is31.global_current)

examples/is31fl3741_simpletest.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import board
66
import adafruit_is31fl3741
77

8-
is31 = adafruit_is31fl3741.IS31FL3741(board.I2C())
8+
i2c = board.I2C() # uses board.SCL and board.SDA
9+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
10+
is31 = adafruit_is31fl3741.IS31FL3741(i2c)
911

1012
is31.set_led_scaling(0xFF) # turn on LEDs all the way
1113
is31.global_current = 0xFF # set current to max

0 commit comments

Comments
 (0)