Site Guide

Find your way around the Engineering Club.

Know what you need? Search for a component, concept or project.

Around the site

Start

Labs

TestingExperimental

Build

Club

LearnExperimental

Go a little deeper

Entry points to larger collections. Use Search for individual records.

Learning paths & reference

Inside PiCrawlerExperimental

Inside Inventory

Multi-Display System / Stage 2 of 3

Detailed character role

Initialize a compatible LCD backpack and show fixed-width detailed text.

Firmware source authored · compile not attempted in this pass

Download stage 2 PlatformIO projectRead code & run steps ↓

What changes now?

Initialize a compatible LCD backpack and show fixed-width detailed text.

Expected after hardware review: Both distinct roles operate without address conflict.

Builds on stage 1: Graphics/status role.

What you need

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.
Conditional connection table and full module facts

Electrical review is incomplete. Conditional references require confirmation; unresolved pins or rails are not wiring instructions. Power off before changing connections.

From device / pinTo device / pinSignal / voltageConnection status and notes
2.42-inch SSD1309 128×64 OLED Display Module (I²C)
SDA
ELEGOO ESP-WROOM-32 development board
GPIO21
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 board
GPIO22
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 Backpack
SDA/SCL
Documented bidirectional I²C level translator
5 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/peripheral
GND
controller
GND
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/peripheral
VCC
verified supply
Pin 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.

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
  • 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.

Use this complete project

Target: esp32dev · Environment: checkpoint2 · Stage branch: DISPLAY_STAGE=2

  1. Open the complete project. Download the stage ZIP, extract it and open the folder containing platformio.ini and src in VS Code. Keep its supporting headers and libraries together.
  2. Build stage 2. Select checkpoint2 in PlatformIO Project Tasks → General → Build, or use a PlatformIO terminal:
    pio run -e checkpoint2
    A successful Build compiles the program; it does not upload it or approve electrical connections.
  3. Stop at the hardware gate. The supplied electrical-review flag remains false. Have a qualified reviewer complete the actual module, wiring and power checks before using an approved configuration for hardware operation.

    As supplied, Serial at 115200 baud reports STOP: complete wiring/power review in guide before enabling hardware. and initialization stops.

After electrical review: Upload and Monitor

Only with the actual setup reviewed and the configuration explicitly approved, choose this stage's Upload task. Close any monitor using the board first.

pio run -e checkpoint2 -t upload

Open the matching Monitor at 115200 baud, then compare the expected result with what actually happens.

pio device monitor -b 115200

Record Build, Upload and physical observations separately.

Complete source

The viewer starts at src/main.cpp. Use Source file for the board profile, PlatformIO configuration and supporting code. Keep the complete ZIP together.

workspaces/multi-display-system/src/main.cpp

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-256363b948d0c042d36b255d9943314cca7eee0936176693f545db490e9765fd706

Raw downloads and standalone ZIPs retain the canonical bytes and supporting files. Copy follows the selected Comments setting.

Check the result

Both distinct roles operate without address conflict.

As supplied, the false electrical-review flag prevents this hardware result. After qualified review, record what actually happens; the text above is an expected result, not a bench transcript.

Original verification checklist
  1. Build the exact selected environment; distinguish dependency resolution from source compilation.
  2. Observe the stated output and record actual behavior; expected result is not an observed transcript.
  3. Test the named failure mode before proceeding.

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.

Technical explanation / original guide

Read the complete original stage guide

Original source/research wording is preserved. The stage's dated build evidence above supersedes earlier blanket compile-status wording; no physical results are implied.

Build it

Initialize a compatible LCD backpack and show fixed-width detailed text.

Open workspaces/multi-display-system in VS Code/PlatformIO. Select checkpoint2 and run pio run -e checkpoint2. This is FIRMWARE_SOURCE_AUTHORED with embedded compilation unverified. Review the electrical flag and canonical conditional wiring before any upload.

Understand it

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.

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.

Expected result and verification

Both distinct roles operate without address conflict.

This is expected after a correct build and electrical review, not a captured bench transcript.

Check the selected source branch and named failure conditions. Record actual build or software output separately from future physical observations.

Likely failures

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.

Build evidence, target and remaining verification

Original status: unverified.

No successful build for this stage is recorded in the dated embedded compile ledger.

No compile was attempted in this pass under the user's testing limit. Upload and physical bench observation remain untested.

espressif32@6.12.0 · arduino

Diagnostics before integration