[Issue #12] - Adding config options for configuring the pins used for SDA/SCL for the display
This commit is contained in:
@@ -2,6 +2,10 @@
|
|||||||
WIFI_SSID = "YourSSID" # Set this to your Wi-Fi network name
|
WIFI_SSID = "YourSSID" # Set this to your Wi-Fi network name
|
||||||
WIFI_PASSWORD = "YourPassword" # Set this to your Wi-Fi network password
|
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
|
# Time settings
|
||||||
USE_24_HOUR = False # Set this to True for 24-hour time (no AM/PM)
|
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
|
UTC_OFFSET = -5 # Set this to your desired NTP server
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ except ImportError:
|
|||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
# --- Hardware Setup ---
|
# --- 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)
|
oled = ssd1306.SSD1306_I2C(128, 64, i2c)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user