From 52530ab2ff914c89fa251ba4d50eacc2b6245cb3 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Wed, 9 Sep 2026 14:15:35 -0400 Subject: [PATCH] [Issue #12] - Adding config options for configuring the pins used for SDA/SCL for the display --- config.example.py | 4 ++++ main.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config.example.py b/config.example.py index 6760316..30c0e99 100644 --- a/config.example.py +++ b/config.example.py @@ -2,6 +2,10 @@ WIFI_SSID = "YourSSID" # Set this to your Wi-Fi network name WIFI_PASSWORD = "YourPassword" # Set this to your Wi-Fi network password +# Display Settings +DISPLAY_SDA_PIN = 4 # Default SDA pin is GP4 +DISPLAY_SCL_PIN = 5 # Default SCL pin is GP5 + # Time settings USE_24_HOUR = False # Set this to True for 24-hour time (no AM/PM) UTC_OFFSET = -5 # Set this to your desired NTP server diff --git a/main.py b/main.py index 2b6525e..d016c86 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ except ImportError: time.sleep(2) # --- Hardware Setup --- -i2c = I2C(0, sda=Pin(16), scl=Pin(17), freq=400000) +i2c = I2C(0, sda=Pin(Config.DISPLAY_SDA_PIN), scl=Pin(Config.DISPLAY_SCL_PIN), freq=400000) oled = ssd1306.SSD1306_I2C(128, 64, i2c)