Skip to content

Commit 821979b

Browse files
authored
Merge pull request #16 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 17714bf + c513e94 commit 821979b

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

examples/displayio_sh1107_game_of_life.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def conway(output):
9191
output[(output.width - 8) // 2 + j, y] = cj & 1
9292

9393

94-
i2c = board.I2C()
94+
i2c = board.I2C() # uses board.SCL and board.SDA
95+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
9596
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)
9697

9798
# SH1107 is vertically oriented 64x128

examples/displayio_sh1107_mono_128x128_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
displayio.release_displays()
1717

1818
# For I2C
19-
display_bus = displayio.I2CDisplay(board.I2C(), device_address=0x3D)
19+
i2c = board.I2C() # uses board.SCL and board.SDA
20+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
21+
display_bus = displayio.I2CDisplay(i2c, device_address=0x3D)
2022

2123
# For SPI:
2224
# import busio

examples/displayio_sh1107_random_motion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
# oled_reset = board.D9
2323

2424
# Use for I2C
25-
i2c = board.I2C()
25+
i2c = board.I2C() # uses board.SCL and board.SDA
26+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2627
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)
2728

2829
# SH1107 is vertically oriented 64x128

examples/displayio_sh1107_simpletest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
# oled_reset = board.D9
2222

2323
# Use for I2C
24-
i2c = board.I2C()
24+
i2c = board.I2C() # uses board.SCL and board.SDA
25+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2526
display_bus = displayio.I2CDisplay(i2c, device_address=0x3C)
2627

2728
# SH1107 is vertically oriented 64x128

0 commit comments

Comments
 (0)