Testing / Displays / 12
E-Ink Hello World
Understand the exact four-color panel, memory representation and refresh contract before its driver port.
Host software model · physical driver still required
What you'll build
Run a host model for a 384×184 abstract two-bit palette.
First model result: The model reports 17664 bytes and verifies four packed colors.
What you need
A computer with VS Code, PlatformIO and a working native C++ toolchain. No display hardware is needed for this model.
The eventual physical port also requires the following hardware; it is not needed to run stages 1 and 2.
Check availability and exact module markings before starting.
Connections / current hardware gate
Before connecting power. Stages 1 and 2 are computer-only models. Stage 3 needs the exact Waveshare 3.5-inch G driver, carrier electrical review and a completed target build; no physical firmware is supplied.
- Use the native host environments for the first two stages; do not upload them to the display board.
- For a later physical port, identify the exact G panel/carrier and review supply, logic, SPI/control pins and reset/BUSY timing.
- Review the matching vendor source and license before implementing transport or refresh behavior.
Start building
- 1
Palette/memory model
Run a host model for a 384×184 abstract two-bit palette.
- 2
Refresh contract
Distinguish layout storage from vendor transport encoding.
- 3
Physical hello world port
Port the matching Waveshare 3.5-inch G driver after revision/logic verification.
Physical driver not implemented · no firmware download
Download host models (stages 1–2)
Each stage has its exact environment, complete source and expected result. Editor and tools setup →
Troubleshooting
Old image remains
Treat retention as expected physics, not evidence of a successful upload. Verify Serial, power, reset and BUSY with the matching driver.
Ghosting or color mismatch
Confirm exact G-model palette/driver and full-refresh procedure. Do not enable partial refresh based on another panel’s tutorial.
Port fails
Resolve the real vendor source path/version/license and driver-board revision first. Native model success is not an embedded build.
More detail
Foundations, safety and learning objectives
200 minutes · Editorial learning estimate excluding unresolved procurement/driver-port time
Two host-model checkpoints and an unimplemented physical driver gate.
- Keep electrical review false until the exact wiring/power/logic checklist is completed.
- No power budget is inferred from successful compilation.
- Understand the exact four-color panel, memory representation and refresh contract before its driver port.
- The inventory establishes Waveshare 3.5-inch e-Paper (G), 384×184 with red, yellow, black and white.
System diagram and electrical boundaries
Show the meaningful subsystem and signal/power boundary for E-Ink Hello World. Conceptual system view; physical connections remain conditional.
- ELEGOO ESP-WROOM-32 development boardClub-owned
- Waveshare 3.5-inch e-Paper (G) with driver boardClub-owned
The model does not communicate with the screen. Stage 3 requires the exact board and driver integration.
Signals and interfaces
No physical connection is specified for this boundary.
Power and common reference boundary
- Waveshare 3.5-inch e-Paper (G) with driver boardExact G-driver contractELEGOO ESP-WROOM-32 development boardUnresolved · do not wire
- display/peripheralSignal referencecontrollerConditional reference
- display/peripheralPeripheral powerverified supplyConditional reference
Interfaces: SPI · BUSY
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.
- Physical driver port required.
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
- Resolution: 384 × 184
- Colors: Red, yellow, black, white
- Interface: SPI
- Driver-board supply/logic revision: Verify board labels/manual
- 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
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 |
|---|---|---|---|
Waveshare 3.5-inch e-Paper (G) with driver boardVCC/GND/DIN/CLK/CS/DC/RST/BUSY | ELEGOO ESP-WROOM-32 development boardPin unresolved | Exact G-driver contract Voltage unresolved | Unresolved · do not wire Board revision and exact driver must establish pin mapping, allowed rails, reset and BUSY contract. |
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/eink-hello-world
Stages 1 and 2 only; no physical stage 3 firmware is included.
workspaces/eink-hello-world/src/main.cpp
#include <array>
#include <iostream>
#include <cassert>
enum class Ink:unsigned {black=0,white=1,yellow=2,red=3};
int main(){ // abstract packing model, NOT a vendor transmission encoding
constexpr unsigned width=384,height=184;std::array<unsigned char,width*height/4> packed{};
packed[0]=static_cast<unsigned char>((unsigned(Ink::black)<<6)|(unsigned(Ink::white)<<4)|(unsigned(Ink::yellow)<<2)|unsigned(Ink::red));
assert(packed.size()==17664);assert(packed[0]==0x1b);
std::cout<<"abstract 2-bit palette model: "<<packed.size()<<" bytes; not hardware SPI data\n";
#if DISPLAY_STAGE >= 2
std::cout<<"Full refresh must use the exact 3.5-inch G vendor driver and BUSY contract.\n";
#endif
}
Source integrity · SHA-256
89daf5aa3f27890127b1257d0f07721ddfcabcb3294b009a9fb0c2e92627125eRaw 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.
Understand the exact four-color panel, memory representation and refresh contract before its driver port.
Status: ARCHITECTURE_COMPLETE_PORT_REQUIRED. SOFTWARE_MODEL_AUTHORED; embedded build NOT_APPLICABLE_HOST_MODEL; hardware NOT_TESTED. Two host-model checkpoints and an unimplemented physical driver gate.
What you are building
The inventory establishes Waveshare 3.5-inch e-Paper (G), 384×184 with red, yellow, black and white. That is not a generic monochrome panel or a similarly sized three-color B model. Electrophoretic particles retain an image after the drive operation; a retained picture does not prove that the controller is powered or successfully communicating now. Full refresh takes much longer than an OLED frame transfer, and it can produce a visibly flashing transition.
Before you start
Estimated learning time: 200 minutes, excluding unresolved hardware/port work. Required prerequisites: display-i2c-detective. 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:e-ink-display-with-driver-pcb | CLUB_OWNED | 1 | PREFLIGHT_REQUIRED |
Checkpoints1/2 run on a computer and require no connected display, MCU or physical wiring. The table describes the later physical checkpoint.
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:e-ink-display-with-driver-pcb / VCC/GND/DIN/CLK/CS/DC/RST/BUSY | club:elegoo-esp-wroom-32-development-board / None | Exact G-driver contract | None / UNRESOLVED_DO_NOT_WIRE | Board revision and exact driver must establish pin mapping, allowed rails, reset and BUSY contract. |
| 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/eink-hello-world in VS Code/PlatformIO. Configuration: workspaces/eink-hello-world/platformio.ini. Platform: native@1.2.1. Board/framework: host computer / native C++. Dependencies: no external lib_deps. Dependency resolution occurs during build; an include is not an installation. See LIBRARY_MATRIX.md and COMPILATION_AUDIT.md for exact verification limits. These are native software models. Run .pio/build/checkpoint1/program or .pio/build/checkpoint2/program after a successful native build. Do not upload them to a display board. Direct-GCC reproduction is available through python3 validation/host_tests.py from the package root.
Build it: checkpoint path
| Stage | Goal | Environment | Expected / gate |
|---|---|---|---|
| Palette/memory model | Run a host model for a 384×184 abstract two-bit palette. | checkpoint1 | The model reports 17664 bytes and verifies four packed colors. |
| Refresh contract | Distinguish layout storage from vendor transport encoding. | checkpoint2 | The model explicitly states that it is not SPI output. |
| Physical hello world port | Port the matching Waveshare 3.5-inch G driver after revision/logic verification. | PORT_REQUIRED | NOT AUTHORED: exact driver installation, timeout-aware BUSY handling and a linked target build are release gates. |
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 authored native checkpoints exercise an abstract two-bit palette and its memory calculation. The byte codes are an original teaching representation, explicitly not the vendor’s transfer format or waveform. No guessed initialization commands, LUT, controller suffix or GxEPD2 constructor are supplied. The direct manufacturer manual fetch was blocked and the attempted legacy vendor header path was not found. The physical stage therefore remains PORT_REQUIRED, with a precise driver/board contract instead of a fake working sketch.
A raw panel and a panel plus driver PCB have different supply/interface requirements. The known package includes a driver board, but its revision and level circuitry still need matching documentation. Read the actual VCC/GND/DIN/CLK/CS/DC/RST/BUSY labels and confirm the supported host rail. Reset timing, BUSY polarity and maximum refresh duration must come from the exact driver. A timeout prevents endless waiting but does not safely interrupt an unspecified panel waveform.
Canonical code reading map
| Real file | Source landmarks (1-based) | Lines |
|---|---|---|
| workspaces/eink-hello-world/src/main.cpp | 5: int main(){ // abstract packing model, NOT a vendor transmission encoding | 13 |
| 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
Old image remains
Treat retention as expected physics, not evidence of a successful upload. Verify Serial, power, reset and BUSY with the matching driver.
Ghosting or color mismatch
Confirm exact G-model palette/driver and full-refresh procedure. Do not enable partial refresh based on another panel’s tutorial.
Port fails
Resolve the real vendor source path/version/license and driver-board revision first. Native model success is not an embedded build.
Experiments after the baseline
Compute memory at one, two and four bits per pixel.
Design a compact four-color layout on paper.
Compare full-refresh observations only after the vendor baseline runs.
Challenge
Specify an error state for a BUSY timeout without claiming the display was safely updated.
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/. The exact physical driver is still PORT_REQUIRED.
Source records: inventory-club-v3, inventory-member-v14, pio-deps, epaper-product, epaper-manual, json-lib, 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.
- Stage 2: no successful compile in the dated embedded ledger.
- Stage 3: no successful compile in the dated embedded ledger.
Historical compile evidence is separate from the original guide's earlier unverified status and does not establish today's build or hardware behavior.
Technical sources and references
- PlatformIO dependencies
Dependency installation occurs during package/build processing
- Waveshare 3.5-inch G product
384×184, red/yellow/black/white; driver/board compatibility still required
- Waveshare exact G manual
Direct fetch blocked; no driver timing/palette transport inferred
- ArduinoJson
Version-six bounded parser API; package retrieval still required
- Official PlatformIO IDE installation
Official VS Code extension includes Core and project environment tasks