Skip to content

Commit 1afca38

Browse files
authored
Merge pull request #79 from adafruit/stemma_i2c
Added commented out board.STEMMA_I2C with explanation
2 parents 7d429dc + f21f7bb commit 1afca38

5 files changed

+10
-5
lines changed

examples/ssd1306_pillow_clock.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# Setting some variables for our reset pin etc.
1919
RESET_PIN = digitalio.DigitalInOut(board.D4)
2020

21-
i2c = board.I2C()
21+
i2c = board.I2C() # uses board.SCL and board.SDA
22+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2223
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)
2324

2425
# Clear display.

examples/ssd1306_pillow_demo.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
BORDER = 5
2626

2727
# Use for I2C.
28-
i2c = board.I2C()
28+
i2c = board.I2C() # uses board.SCL and board.SDA
29+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2930
oled = adafruit_ssd1306.SSD1306_I2C(WIDTH, HEIGHT, i2c, addr=0x3C, reset=oled_reset)
3031

3132
# Use for SPI

examples/ssd1306_pillow_image_display.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# Setting some variables for our reset pin etc.
1919
RESET_PIN = digitalio.DigitalInOut(board.D4)
2020

21-
i2c = board.I2C()
21+
i2c = board.I2C() # uses board.SCL and board.SDA
22+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2223
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)
2324

2425
# Clear display.

examples/ssd1306_pillow_ip.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def get_ip_address(ifname):
3434
TEXT = ""
3535

3636
# Very important... This lets py-gaugette 'know' what pins to use in order to reset the display
37-
i2c = board.I2C()
37+
i2c = board.I2C() # uses board.SCL and board.SDA
38+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
3839
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)
3940

4041
# This sets TEXT equal to whatever your IP address is, or isn't

examples/ssd1306_pillow_text.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
RESET_PIN = digitalio.DigitalInOut(board.D4)
1919

2020
# Very important... This lets py-gaugette 'know' what pins to use in order to reset the display
21-
i2c = board.I2C()
21+
i2c = board.I2C() # uses board.SCL and board.SDA
22+
# i2c = board.STEMMA_I2C() # For using the built-in STEMMA QT connector on a microcontroller
2223
oled = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c, addr=0x3D, reset=RESET_PIN)
2324

2425
# Clear display.

0 commit comments

Comments
 (0)