Skip to content

Commit

Permalink
Add support for OLED screen at pins 17 & 18 (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorrak committed Jan 9, 2023
1 parent f4bc5fe commit 0658b25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ v1.2.0 - Jan 9, 2023 - Fix OLED & Refactor LCD Code
- Refactor LCD code to combine "D32 TFT" and "ESPI TFT" code
- Replace existing M5 libraries with (existing) ESPI TFT library
- Add new "User Target" data destination
- Add support for OLED display at pins 17 & 18


v1.1.3 - Aug 18, 2022 - Fix WiFi Manager
Expand Down
12 changes: 11 additions & 1 deletion src/bridge_lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,17 @@ void bridge_lcd::init() {
oled_display = new SSD1306Wire(0x3c, 4, 15);
} else {
digitalWrite(16, LOW); // We weren't able to find the TTGO board, so reset the pin
oled_display = new SSD1306Wire(0x3c, 21, 22); // ... and just default to the "sleeve" configuration

pinMode(21, OUTPUT);
digitalWrite(21, LOW); // Set GPIO16 low to reset OLED
delay(50);
digitalWrite(21, HIGH); // While OLED is running, must set GPIO16 in high
if (i2c_device_at_address(0x3c, 17, 18)) {
oled_display = new SSD1306Wire(0x3c, 17, 18);
} else {
digitalWrite(21, LOW); // We weren't able to find the TTGO board, so reset the pin
oled_display = new SSD1306Wire(0x3c, 21, 22); // ... and just default to the "sleeve" configuration
}
}
}

Expand Down

0 comments on commit 0658b25

Please sign in to comment.