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

Testing / Displays / 15

Touchscreen Interface

Build release-aware UI semantics for the actual Waveshare touch-board family and define its port contract.

Host software model · physical driver still required

What you'll build

Run the host test for half-open rectangles and a touch-down event.

First model result: Holding produces one action; the far edge is excluded.

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.

  • Waveshare ESP32-C6-Touch-LCD-1.47 · Member-provided

Check availability and exact module markings before starting.

Connections / current hardware gate

Before connecting power. Stages 1 and 2 are computer-only touch models. The member-provided C6 board needs revision confirmation and real JD9853/AXS5106L drivers before stage 3 can operate hardware.

  • Arrange access to the member-provided board; availability is not implied by a catalog record.
  • Identify the exact ESP32-C6-Touch-LCD-1.47 revision and compatible ESP-IDF/PlatformIO target.
  • Review vendor drivers/licenses, shared SPI behavior and the onboard display/touch map; the model's coordinate transform is not measured calibration.

Start building

  1. 1

    Hit box and touch edge

    Run the host test for half-open rectangles and a touch-down event.

  2. 2

    Coordinate transform

    Test a portrait-to-landscape transform before visual integration.

  3. 3

    JD9853/AXS5106L hardware port

    Integrate the correct board drivers through a PlatformIO ESP-IDF target.

    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

Pixels work but touch does not

Inspect the touch I²C device/driver separately from LCD SPI. A visible screen does not prove the input path.

Touch reversed or offset

Log raw corner samples, establish orientation and apply one tested transform. Avoid trial-and-error multiple rotations in separate layers.

Cannot build C6 target

Confirm framework support and actual board family. The supplied native test is not an ESP32-C6 executable.

More detail

Foundations, safety and learning objectives

280 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.
  • Build release-aware UI semantics for the actual Waveshare touch-board family and define its port contract.
  • The latest member inventory identifies ESP32-C6-Touch-LCD-1.47, whose manufacturer documentation specifies a JD9853 display and AXS5106L touch controller.
System diagram and electrical boundaries
Touchscreen Interface · subsystem relationships

Show the meaningful subsystem and signal/power boundary for Touchscreen Interface. Conceptual system view; physical connections remain conditional.

  • Waveshare ESP32-C6-Touch-LCD-1.47Member-provided
Host software model → physical driver boundary

The model does not communicate with the screen. Stage 3 requires the exact board and driver integration.

Signals and interfaces

  • Waveshare ESP32-C6-Touch-LCD-1.47LCD SCKonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47LCD MOSIonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47LCD CSonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47LCD DConboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47LCD RSTonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47LCD BLonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47TP SDAonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47TP SCLonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47TP RSTonboard ESP32-C6manufacturer family map
  • Waveshare ESP32-C6-Touch-LCD-1.47TP INTonboard ESP32-C6manufacturer family map

Power and common reference boundary

No physical connection is specified for this boundary.

Interfaces: SPI · I2C · Touch

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

  • Waveshare ESP32-C6-Touch-LCD-1.47Member-provided

    product family verified · preflight required

    Compatibility and unresolved details
    • Board family: ESP32-C6-Touch-LCD-1.47
    • Display driver: JD9853
    • Touch driver: AXS5106L
    • Resolution: 172 × 320
    • Header subvariant/PCB revision, compatible pinned driver port, physical corner observations

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
Waveshare ESP32-C6-Touch-LCD-1.47
LCD SCK
onboard ESP32-C6
GPIO1
LCD SCK
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
LCD MOSI
onboard ESP32-C6
GPIO2
LCD MOSI
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
LCD CS
onboard ESP32-C6
GPIO14
LCD CS
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
LCD DC
onboard ESP32-C6
GPIO15
LCD DC
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
LCD RST
onboard ESP32-C6
GPIO22
LCD RST
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
LCD BL
onboard ESP32-C6
GPIO23
LCD BL
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
TP SDA
onboard ESP32-C6
GPIO18
TP SDA
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
TP SCL
onboard ESP32-C6
GPIO19
TP SCL
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
TP RST
onboard ESP32-C6
GPIO20
TP RST
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

Waveshare ESP32-C6-Touch-LCD-1.47
TP INT
onboard ESP32-C6
GPIO21
TP INT
3.3 V
manufacturer family map

Onboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

All source files, supporting libraries and project download

Download complete project · workspaces/touch-interface

Stages 1 and 2 only; no physical stage 3 firmware is included.

    workspaces/touch-interface/src/main.cpp

    main.cpp
    #include <DisplayCore.h>
    #include <iostream>
    #include <cassert>
    int main(){displaylab::Rect button{10,20,80,40};displaylab::Touch touch;unsigned actions=0;
    const bool inside=button.contains(30,30);if(inside&&touch.press(true))++actions;
    if(inside&&touch.press(true))++actions;
    touch.press(false);
    assert(actions==1);assert(!button.contains(90,30));assert(!button.contains(-1,30));
    std::cout<<"one action per touch-down; half-open hit box verified\n";
    #if DISPLAY_STAGE >= 2
    int x=30,y=40;const int rotatedX=319-y,rotatedY=x;assert(rotatedX==279&&rotatedY==30);
    std::cout<<"portrait-to-landscape transform: 279,30; hardware orientation must be measured\n";
    #endif
    }
    
    Source integrity · SHA-256c992215f5574db709af7fd329d06daedc75ab8b331c068f374b8f09d71c22785

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

    Build release-aware UI semantics for the actual Waveshare touch-board family and define its port contract.

    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 latest member inventory identifies ESP32-C6-Touch-LCD-1.47, whose manufacturer documentation specifies a JD9853 display and AXS5106L touch controller. The non-touch ESP32-C6-LCD-1.47 uses different hardware and must not contribute its ST7789 or GPIO map. Display pixels and touch samples also need one agreed orientation. The transform in the model is a deliberate geometry fixture; physical raw ranges and rotation still need measurement.

    Before you start

    Estimated learning time: 280 minutes, excluding unresolved hardware/port work. Required prerequisites: display-oled-graphics, 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 IDAccess scopeExpected snapshot quantityPreflight
    member:personal-waveshare-esp32-c6-displayMEMBER_PROVIDED1PREFLIGHT_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.

    FromToSignalVoltage / gateCondition
    member:personal-waveshare-esp32-c6-display / LCD SCKonboard ESP32-C6 / GPIO1LCD SCK3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / LCD MOSIonboard ESP32-C6 / GPIO2LCD MOSI3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / LCD CSonboard ESP32-C6 / GPIO14LCD CS3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / LCD DConboard ESP32-C6 / GPIO15LCD DC3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / LCD RSTonboard ESP32-C6 / GPIO22LCD RST3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / LCD BLonboard ESP32-C6 / GPIO23LCD BL3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / TP SDAonboard ESP32-C6 / GPIO18TP SDA3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / TP SCLonboard ESP32-C6 / GPIO19TP SCL3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / TP RSTonboard ESP32-C6 / GPIO20TP RST3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.
    member:personal-waveshare-esp32-c6-display / TP INTonboard ESP32-C6 / GPIO21TP INT3.3 / MANUFACTURER_FAMILY_MAPOnboard family map from manufacturer; no external rewiring instruction. Match actual PCB revision.

    Software setup and dependencies

    Open workspaces/touch-interface in VS Code/PlatformIO. Configuration: workspaces/touch-interface/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

    StageGoalEnvironmentExpected / gate
    Hit box and touch edgeRun the host test for half-open rectangles and a touch-down event.checkpoint1Holding produces one action; the far edge is excluded.
    Coordinate transformTest a portrait-to-landscape transform before visual integration.checkpoint2The fixture transforms 30,40 into 279,30 for the stated geometry.
    JD9853/AXS5106L hardware portIntegrate the correct board drivers through a PlatformIO ESP-IDF target.PORT_REQUIREDPORT_REQUIRED: this is a contract and verified family pin map, not an authored device driver.

    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

    A touch-level is not a click event. The Touch model produces an event only on a transition into contact. A rectangular widget includes its near edges and excludes far edges, avoiding adjacent widgets both claiming a shared boundary. The real port must update contact state even when a touch is outside a widget so releases are not lost. Standard PlatformIO’s C6 board page lists ESP-IDF, so an ordinary classic-ESP32 Arduino environment is not mislabeled as a tested C6 build.

    The matching manufacturer map shares LCD/TF SPI on GPIO1/2, uses LCD CS14/DC15/RST22/BL23, and places touch I²C on SDA18/SCL19 with reset20/interrupt21. Those are onboard signals, not instructions to rewire the integrated screen. The shared SPI requires inactive chip-select control for whichever peripheral is not being addressed. An installed touch driver, exact initialization sequence, panel orientation and a compatible ESP-IDF version remain port/compile gates.

    Source review precision: The fixture uses a half-open rectangle and a touch-down edge, then checkpoint2 tests x′=319−y, y′=x for (30,40)→(279,30). It does not sample AXS5106L, initialize JD9853, measure a corner, or establish the installed panel orientation.

    Canonical code reading map

    Real fileSource landmarks (1-based)Lines
    workspaces/touch-interface/src/main.cpp4: int main(){displaylab::Rect button{10,20,80,40};displaylab::Touch touch;unsigned actions=0;14
    common-libs/DisplayCore/src/DisplayCore.h30: 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

    Pixels work but touch does not

    Inspect the touch I²C device/driver separately from LCD SPI. A visible screen does not prove the input path.

    Touch reversed or offset

    Log raw corner samples, establish orientation and apply one tested transform. Avoid trial-and-error multiple rotations in separate layers.

    Cannot build C6 target

    Confirm framework support and actual board family. The supplied native test is not an ESP32-C6 executable.

    Experiments after the baseline

    Create a release-to-activate policy and compare it with touch-down activation.

    Add a second page whose widgets share an edge.

    Plan an SD-backed asset only after the shared-bus driver contract is verified.

    Challenge

    Implement cancel-on-drag-out behavior while correctly handling a release outside every widget.

    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, waveshare-touch, waveshare-nontouch, pio-c6, dht-lib, 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