E-Ink Hello World / Stage 1 of 3
Palette/memory model
Run a host model for a 384×184 abstract two-bit palette.
Host software model · physical driver still required
Download stage 1 host modelRead code & run steps ↓
What changes now?
Initial isolated observation
Expected 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.
Connections / current hardware gate
This stage runs on your computer. Leave display hardware disconnected; the host model does not send data to the physical screen.
Use this complete project
Target: native · Environment: checkpoint1 · Stage branch: DISPLAY_STAGE=1
- Open the complete project. Download the stage ZIP, extract it and open the folder containing
platformio.iniandsrcin VS Code. Keep its supporting headers and libraries together. - Build stage 1. Select
checkpoint1in PlatformIO Project Tasks → General → Build, or use a PlatformIO terminal:
A successful Build compiles the program; it does not upload it or approve electrical connections.pio run -e checkpoint1 - Run the host model. In Windows PowerShell, from the extracted project folder:
.\.pio\build\checkpoint1\program.exeOn Linux/macOS use
.pio/build/checkpoint1/program. This needs a working native compiler/toolchain; it is not a microcontroller upload.
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/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.
Check the result
The model reports 17664 bytes and verifies four packed colors.
Compare the program's output with the stated model result. It does not establish physical display behavior.
Original verification checklist
- Build the exact selected environment; distinguish dependency resolution from source compilation.
- Observe the stated output and record actual behavior; expected result is not an observed transcript.
- Test the named failure mode before proceeding.
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.
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
Run a host model for a 384×184 abstract two-bit palette.
Open workspaces/eink-hello-world in VS Code/PlatformIO. Select checkpoint1 and run pio run -e checkpoint1. This is SOFTWARE_MODEL_AUTHORED. Run .pio/build/checkpoint1/program after building; no hardware or upload is required.
Understand it
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.
Expected result and verification
The model reports 17664 bytes and verifies four packed colors.
This is software-only assertion/output evidence; it does not establish physical behavior.
Check the selected source branch and named failure conditions. Record actual build or software output separately from future physical observations.
Likely failures
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.
Build evidence, target and remaining verification
Original status: not applicable host model.
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.
native@1.2.1 · native C++