Testing / Displays / 16
Multi-Display System
Give a character LCD and OLED different roles on a carefully voltage-managed shared bus.
Firmware source authored · compile not attempted in this pass
What you'll build
Render the SSD1309 graphics/status role; this checkpoint also attempts LCD initialization but does not write its detailed text.
First result after hardware review: OLED gives a graphical/status presentation.
What you need
- LCD1602 16×2 Character Display with I²C Backpack
- 2.42-inch SSD1309 128×64 OLED Display Module (I²C)
- ELEGOO ESP-WROOM-32 development board
- Documented bidirectional I²C level translator · Additional hardware needed
Check availability and exact module markings before starting.
Connections / current hardware gate
Before connecting power. A documented bidirectional I²C level translator is missing. Review both carriers' supply and pull-up rails before sharing the bus; a 5 V LCD rail must not be assumed safe for ESP32.
- Confirm each display's address, supply and pull-up rail separately.
- Obtain and review the required level translator and common-ground arrangement.
- Review the conditional shared-bus map and the program's separate LCD/OLED failure handling before enabling hardware.
Start building
- 1
Graphics/status role
Render the SSD1309 graphics/status role; this checkpoint also attempts LCD initialization but does not write its detailed text.
- 2
Detailed character role
Initialize a compatible LCD backpack and show fixed-width detailed text.
- 3
Subsystem failure status
Keep the OLED running if LCD initialization fails.
Download complete PlatformIO project
Each stage has its exact environment, complete source and expected result. Editor and tools setup →
Troubleshooting
One display disappears after adding the other
Check address collision and effective pull-up resistance/rail. Test separately to avoid guessing which module owns an ACK.
ESP32 resets
Inspect supply/ground and unintended 5 V injection through signal lines. Two devices working alone does not prove their combined wiring is safe.
Old LCD digits
Review complete fixed-width overwrites and maximum output length.
More detail
Foundations, safety and learning objectives
230 minutes · Editorial learning estimate excluding unresolved procurement/driver-port time
Three actual PlatformIO firmware environments; embedded compile and bench verification unestablished.
- Keep electrical review false until the exact wiring/power/logic checklist is completed.
- No power budget is inferred from successful compilation.
- Give a character LCD and OLED different roles on a carefully voltage-managed shared bus.
- Two displays are useful when they serve different audiences or tasks.
System diagram and electrical boundaries
Show the meaningful subsystem and signal/power boundary for Multi-Display System. Conceptual system view; physical connections remain conditional.
- ELEGOO ESP-WROOM-32 development boardClub-owned
- LCD1602 16×2 Character Display with I²C BackpackClub-owned
- 2.42-inch SSD1309 128×64 OLED Display Module (I²C)Club-owned
- Documented bidirectional I²C level translatorAdditional hardware needed
Signals and interfaces
- 2.42-inch SSD1309 128×64 OLED Display Module (I²C)I2C SDAELEGOO ESP-WROOM-32 development boardConditional reference
- 2.42-inch SSD1309 128×64 OLED Display Module (I²C)I2C SCLELEGOO ESP-WROOM-32 development boardConditional reference
- LCD1602 16×2 Character Display with I²C BackpackI2C translated pairDocumented bidirectional I²C level translatorConditional reference
Power and common reference boundary
- display/peripheralSignal referencecontrollerConditional reference
- display/peripheralPeripheral powerverified supplyConditional reference
Interfaces: GPIO · I2C
Electrical boundaries and interpretation
- Use conditional wiring records; null pin/voltage means unresolved, not permission to choose a value.
- Draw power and logic paths separately.
- Do not turn a reference signal label into a guessed connector position.
- Keep member, club and campus access labels distinct.
- Include explicit port gate for unresolved driver/identity.
- Access scopes: CLUB_OWNED, MISSING.
- Firmware source is not bench evidence.
Full hardware facts and conditional wiring reference
Access describes the source of a requirement. Check availability, the exact revision and the complete power/driver/harness system before starting. Inventory quantities are expected purchase/BOM quantities, not live stock.
product family verified · preflight required
Compatibility and unresolved details
- Display: 16 × 2 characters
- Interface: I²C backpack; exact expander revision not asserted
controller verified · preflight required
Compatibility and unresolved details
- Controller: SSD1309
- Resolution: 128 × 64
- Diagonal: 2.42 inches
- Interface: I²C, four-pin version
- Emission color: Variant-dependent / not tracked; requested yellow
- Carrier voltage/address: Not established; verify actual module
- ELEGOO ESP-WROOM-32 development boardClub-owned
product family verified · preflight required
Compatibility and unresolved details
- Headers/USB bridge: Exact carrier count and bridge unverified
- Documented bidirectional I²C level translatorAdditional hardware needed
identity blocked · not established
Compatibility and unresolved details
- Needed between the 5 V LCD backpack and 3.3 V controller bus unless actual carrier provides compatible levels.
Electrical review is incomplete. Conditional references require confirmation; unresolved pins or rails are not wiring instructions. Power off before changing connections.
| From device / pin | To device / pin | Signal / voltage | Connection status and notes |
|---|---|---|---|
2.42-inch SSD1309 128×64 OLED Display Module (I²C)SDA | ELEGOO ESP-WROOM-32 development boardGPIO21 | I2C SDA 3.3 V | Conditional reference Carrier supply/address and pull-up rail need confirmation; catalog establishes SSD1309 family only. |
2.42-inch SSD1309 128×64 OLED Display Module (I²C)SCL | ELEGOO ESP-WROOM-32 development boardGPIO22 | I2C SCL 3.3 V | Conditional reference Use labeled GPIOs on classic ESP32; not the C6 onboard map. |
LCD1602 16×2 Character Display with I²C BackpackSDA/SCL | Documented bidirectional I²C level translator5 V bus side | I2C translated pair Voltage unresolved | Conditional reference Low side connects to the reviewed 3.3 V I2C bus; high side supplies correct backpack pull-ups. |
display/peripheralGND | controllerGND | Signal reference 0 V | Conditional reference Unpowered wiring check; use correct common-ground topology and keep high-current panel returns out of thin signal paths. |
display/peripheralVCC | verified supplyPin unresolved | Peripheral power Voltage unresolved | Conditional reference Supply voltage/current unknown at carrier level until reviewed; no assumed 5 V or 3.3 V instruction. |
All source files, supporting libraries and project download
Download complete project · workspaces/multi-display-system
Open the extracted folder containing platformio.ini and keep the complete supporting files.
olikraus/U8g2@2.36.5duinoWitchery/hd44780@1.3.2
workspaces/multi-display-system/src/main.cpp
#include <Arduino.h>
#include <Wire.h>
#include <U8g2lib.h>
#include <DisplayCore.h>
#include "board_profile.h"
U8G2_SSD1309_128X64_NONAME2_F_HW_I2C oled(U8G2_R0,U8X8_PIN_NONE,22,21);
bool ready=false;uint32_t lastUpdate=0;
#include <hd44780.h>
#include <hd44780ioClass/hd44780_I2Cexp.h>
hd44780_I2Cexp lcd;bool lcdReady=false;
void setup(){Serial.begin(115200); if(!kElectricalReviewComplete){Serial.println("STOP: complete wiring/power review in guide before enabling hardware.");return;}Wire.begin(21,22);oled.setI2CAddress(kOledAddress7<<1);oled.begin();oled.setFont(u8g2_font_6x10_tf);lcdReady=lcd.begin(16,2)==0;ready=true;}
void loop(){if(!ready)return;uint32_t now=millis();if(!displaylab::elapsed(now,lastUpdate,250))return;lastUpdate=now;
#if DISPLAY_STAGE >= 2
if(lcdReady){lcd.setCursor(0,0);lcd.print("Detailed value ");lcd.setCursor(0,1);char line[17];snprintf(line,sizeof(line),"Uptime:%8lus",(unsigned long)(now/1000));lcd.print(line);}else Serial.println("LCD offline; OLED still runs");
#endif
oled.clearBuffer();oled.drawStr(0,10,"Graphics/status role");oled.drawFrame(0,20,128,30);oled.drawBox(1,21,(now/100)%126,28);
#if DISPLAY_STAGE >= 3
oled.drawStr(0,62,lcdReady?"LCD responding":"LCD unavailable");
#endif
oled.sendBuffer();}
Source integrity · SHA-256
363b948d0c042d36b255d9943314cca7eee0936176693f545db490e9765fd706Raw downloads and standalone ZIPs retain the canonical bytes and supporting files. Copy follows the selected Comments setting.
Original engineering guide
Original research wording is preserved. Use the stage-specific dated build evidence for later compile results; it does not establish physical behavior.
Give a character LCD and OLED different roles on a carefully voltage-managed shared bus.
Status: FIRMWARE_AUTHORED_UNVERIFIED. FIRMWARE_SOURCE_AUTHORED; embedded build UNVERIFIED; hardware NOT_TESTED. Three actual PlatformIO firmware environments; embedded compile and bench verification unestablished.
What you are building
Two displays are useful when they serve different audiences or tasks. The LCD provides dense numeric/text detail; the OLED provides status and graphics. Sharing I²C saves pins, but addresses and electrical rails are real constraints. A 5 V LCD backpack with pull-ups cannot simply be added to the ESP32/OLED bus. Use a documented bidirectional I²C level-shifting arrangement separating the 3.3 V and 5 V sides, or a confirmed compatible carrier.
Before you start
Estimated learning time: 230 minutes, excluding unresolved hardware/port work. Required prerequisites: display-oled-dashboard, display-lcd-menu-system. See PLATFORMIO_ORIENTATION.md and the hardware identity/access records. Current main inventory IDs and expected quantities were compared read-only at a406480e1e13807983f1c03b8a531c2dcd310ddb; expected quantities are not live stock. Member and campus access remain separate from club ownership.
Hardware and conditional wiring
| Component ID | Access scope | Expected snapshot quantity | Preflight |
|---|---|---|---|
| club:elegoo-esp-wroom-32-development-board | CLUB_OWNED | 3 | PREFLIGHT_REQUIRED |
| club:lcd1602-with-i2c-backpack | CLUB_OWNED | 1 | PREFLIGHT_REQUIRED |
| club:yellow-oled-display | CLUB_OWNED | 1 | PREFLIGHT_REQUIRED |
| missing:i2c-translator | MISSING | unspecified | NOT_ESTABLISHED |
Breadboard, appropriately rated jumpers/data cables and a computer are shared setup requirements. Review supply, signal levels and ground separately; power off before changing connections. Null pins/rails remain unresolved.
| From | To | Signal | Voltage / gate | Condition |
|---|---|---|---|---|
| club:yellow-oled-display / SDA | club:elegoo-esp-wroom-32-development-board / GPIO21 | I2C SDA | 3.3 / CONDITIONAL_REFERENCE | Carrier supply/address and pull-up rail need confirmation; catalog establishes SSD1309 family only. |
| club:yellow-oled-display / SCL | club:elegoo-esp-wroom-32-development-board / GPIO22 | I2C SCL | 3.3 / CONDITIONAL_REFERENCE | Use labeled GPIOs on classic ESP32; not the C6 onboard map. |
| club:lcd1602-with-i2c-backpack / SDA/SCL | missing:i2c-translator / 5 V bus side | I2C translated pair | None / CONDITIONAL_REFERENCE | Low side connects to the reviewed 3.3 V I2C bus; high side supplies correct backpack pull-ups. |
| display/peripheral / GND | controller / GND | Signal reference | 0 / CONDITIONAL_REFERENCE | Unpowered wiring check; use correct common-ground topology and keep high-current panel returns out of thin signal paths. |
| display/peripheral / VCC | verified supply / None | Peripheral power | None / CONDITIONAL_REFERENCE | Supply voltage/current unknown at carrier level until reviewed; no assumed 5 V or 3.3 V instruction. |
Software setup and dependencies
Open workspaces/multi-display-system in VS Code/PlatformIO. Configuration: workspaces/multi-display-system/platformio.ini. Platform: espressif32@6.12.0. Board/framework: esp32dev / arduino. Dependencies: olikraus/U8g2@2.36.5, duinoWitchery/hd44780@1.3.2. Dependency resolution occurs during build; an include is not an installation. See LIBRARY_MATRIX.md and COMPILATION_AUDIT.md for exact verification limits. The default electrical-review flag remains false. Review the matching pins, power and logic before changing it; a build cannot complete that physical review.
Build it: checkpoint path
| Stage | Goal | Environment | Expected / gate |
|---|---|---|---|
| Graphics/status role | Render the SSD1309 graphics/status role; this checkpoint also attempts LCD initialization but does not write its detailed text. | checkpoint1 | OLED gives a graphical/status presentation. |
| Detailed character role | Initialize a compatible LCD backpack and show fixed-width detailed text. | checkpoint2 | Both distinct roles operate without address conflict. |
| Subsystem failure status | Keep the OLED running if LCD initialization fails. | checkpoint3 | LCD offline status is visible without a null or uninitialized LCD assumption. |
Choose a stage deliberately. Project downloads include all authored environments; model-only project downloads include checkpoints1/2 and explicitly exclude the unfinished physical checkpoint. Stage3 for a port-gated project refuses download as finished firmware.
Understand it: software and physical model
The system schedules one composition cycle at 250 ms and checks LCD initialization separately. The graphics path is allowed to continue when the LCD cannot initialize. This is limited startup fault isolation: it does not claim runtime hot-unplug recovery or detect every failed display write. A responding address is not a proof of a successful visible update. Matrix output is a later optional third role, requiring its own SPI logic/power design rather than being silently attached.
Test each device alone, record its address, then assemble the shared bus while unpowered. Validate each pull-up rail and the translator’s intended use. A generic slow bidirectional I²C translator is not automatically appropriate for high-speed push-pull HUB75 or SPI. There is no duplication of sensor acquisition in this base; both displays view a shared uptime fixture, allowing presentation differences to be understood before adding sensors.
Source review precision: Checkpoint1 initializes both devices but only draws the OLED role. Checkpoint2 adds LCD writes; checkpoint3 adds the LCD initialization-status label. Failed LCD initialization is isolated only at startup, and bus timeouts/hot-unplug recovery are not implemented.
Canonical code reading map
| Real file | Source landmarks (1-based) | Lines |
|---|---|---|
| workspaces/multi-display-system/include/board_profile.h | Supporting declarations / portable helpers | 5 |
| workspaces/multi-display-system/src/main.cpp | 11: void setup(){Serial.begin(115200); if(!kElectricalReviewComplete){Serial.println("STOP: complete wir; 13: void loop(){if(!ready)return;uint32_t now=millis();if(!displaylab::elapsed(now,lastUpdate,250))retur | 21 |
| common-libs/DisplayCore/src/DisplayCore.h | 30: inline bool parsePacket(const char* text,Packet& result){; 40: bool accept(const Packet& p,uint32_t now){ | 60 |
Read initialization and failure guards first, then the selected DISPLAY_STAGE region and its supporting modules. Source hashes, owners and roles are in code-assets.json. Shared software tests establish portable invariants only. No model substitutes for a physical driver.
Troubleshooting with evidence
One display disappears after adding the other
Check address collision and effective pull-up resistance/rail. Test separately to avoid guessing which module owns an ACK.
ESP32 resets
Inspect supply/ground and unintended 5 V injection through signal lines. Two devices working alone does not prove their combined wiring is safe.
Old LCD digits
Review complete fixed-width overwrites and maximum output length.
Experiments after the baseline
Give a verified matrix an ambient alert role.
Measure each bus transfer and budget the combined schedule.
Add per-subsystem health without equating initialization with continuous correctness.
Challenge
Create a shared measurement model consumed by both renderers with independent display cadences.
Verification and next work
No physical upload or bench observation occurred. Expected device results are targets. Native test output is recorded separately in validation/host-results.json. Current bounded build attempts are in validation/repair-compile-results.json; historical attempts remain under validation/history/. Embedded compile/link and hardware behavior remain unverified until actual evidence is recorded.
Source records: inventory-club-v3, inventory-member-v14, pio-deps, u8g2-api, u8g2-setup, pio-esp32, pio-ide. Verified repository destinations are recorded in repository-integration.json; only resolved IDs are exposed in relatedLabs/relatedLearnConcepts.
Build evidence and diagnostic references
Current compile attempts: not performed in this pass. Physical Upload and bench observation: not tested.
- Stage 1: no successful compile in the dated embedded ledger. The supplied electrical-review flag is false.
- Stage 2: no successful compile in the dated embedded ledger. The supplied electrical-review flag is false.
- Stage 3: no successful compile in the dated embedded ledger. The supplied electrical-review flag is false.
Historical compile evidence is separate from the original guide's earlier unverified status and does not establish today's build or hardware behavior.
Diagnostics before integration
- ACK/NACK bus scan Environment: checkpoint1
- OLED border/corner profile fixture Environment: checkpoint1
Technical sources and references
- PlatformIO classic ESP32
esp32dev target identity; confirm exact installed hardware
- PlatformIO dependencies
Dependency installation occurs during package/build processing
- U8g2 API
Graphics, buffer transfer and shifted address API
- U8g2 constructors
SSD1309 initialization family; exact carrier profile needs bench fixture
- Official PlatformIO IDE installation
Official VS Code extension includes Core and project environment tasks