From 5adbbde3dbdf52df4a75a179a67966a7a6f0d470 Mon Sep 17 00:00:00 2001 From: dherrada Date: Fri, 18 Nov 2022 13:05:29 -0500 Subject: [PATCH] Added commented out board.STEMMA_I2C with explanation --- examples/ssd1306_pillow_clock.py | 3 ++- examples/ssd1306_pillow_demo.py | 3 ++- examples/ssd1306_pillow_image_display.py | 3 ++- examples/ssd1306_pillow_ip.py | 3 ++- examples/ssd1306_pillow_text.py | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/examples/ssd1306_pillow_clock.py b/examples/ssd1306_pillow_clock.py index f79a028..4928059 100644 --- a/examples/ssd1306_pillow_clock.py +++ b/examples/ssd1306_pillow_clock.py @@ -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. diff --git a/examples/ssd1306_pillow_demo.py b/examples/ssd1306_pillow_demo.py index 22bd74a..366d83f 100644 --- a/examples/ssd1306_pillow_demo.py +++ b/examples/ssd1306_pillow_demo.py @@ -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 diff --git a/examples/ssd1306_pillow_image_display.py b/examples/ssd1306_pillow_image_display.py index 679b53b..2a30296 100644 --- a/examples/ssd1306_pillow_image_display.py +++ b/examples/ssd1306_pillow_image_display.py @@ -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. diff --git a/examples/ssd1306_pillow_ip.py b/examples/ssd1306_pillow_ip.py index c2568df..a8a0a40 100644 --- a/examples/ssd1306_pillow_ip.py +++ b/examples/ssd1306_pillow_ip.py @@ -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 diff --git a/examples/ssd1306_pillow_text.py b/examples/ssd1306_pillow_text.py index f0e55fa..052b783 100644 --- a/examples/ssd1306_pillow_text.py +++ b/examples/ssd1306_pillow_text.py @@ -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.