Skip to content

Commit

Permalink
Merge pull request #16 from adafruit/stemma_i2c
Browse files Browse the repository at this point in the history
Added commented out board.STEMMA_I2C with explanation
  • Loading branch information
evaherrada authored Nov 28, 2022
2 parents 17714bf + c513e94 commit 821979b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/displayio_sh1107_game_of_life.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def conway(output):
output[(output.width - 8) // 2 + j, y] = cj & 1


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

# SH1107 is vertically oriented 64x128
Expand Down
4 changes: 3 additions & 1 deletion examples/displayio_sh1107_mono_128x128_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
displayio.release_displays()

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

# For SPI:
# import busio
Expand Down
3 changes: 2 additions & 1 deletion examples/displayio_sh1107_random_motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
# oled_reset = board.D9

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

# SH1107 is vertically oriented 64x128
Expand Down
3 changes: 2 additions & 1 deletion examples/displayio_sh1107_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
# oled_reset = board.D9

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

# SH1107 is vertically oriented 64x128
Expand Down

0 comments on commit 821979b

Please sign in to comment.