Skip to content

Commit

Permalink
Merge pull request #79 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 21, 2022
2 parents 7d429dc + f21f7bb commit 1afca38
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion examples/ssd1306_pillow_clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Setting some variables for our reset pin etc.
RESET_PIN = digitalio.DigitalInOut(board.D4)

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
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)

# Clear display.
Expand Down
3 changes: 2 additions & 1 deletion examples/ssd1306_pillow_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
BORDER = 5

# 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
oled = adafruit_ssd1306.SSD1306_I2C(WIDTH, HEIGHT, i2c, addr=0x3C, reset=oled_reset)

# Use for SPI
Expand Down
3 changes: 2 additions & 1 deletion examples/ssd1306_pillow_image_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Setting some variables for our reset pin etc.
RESET_PIN = digitalio.DigitalInOut(board.D4)

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
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)

# Clear display.
Expand Down
3 changes: 2 additions & 1 deletion examples/ssd1306_pillow_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def get_ip_address(ifname):
TEXT = ""

# Very important... This lets py-gaugette 'know' what pins to use in order to reset the display
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
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)

# This sets TEXT equal to whatever your IP address is, or isn't
Expand Down
3 changes: 2 additions & 1 deletion examples/ssd1306_pillow_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
RESET_PIN = digitalio.DigitalInOut(board.D4)

# Very important... This lets py-gaugette 'know' what pins to use in order to reset the display
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
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)

# Clear display.
Expand Down

0 comments on commit 1afca38

Please sign in to comment.