Skip to content

Designing Touch UIs with LCD Wizard

Designing Touch UIs with LCD Wizard

The slowest part of a touch graphical UI on ESP32 is not the logic but tuning the interface: placing widgets, page navigation, fonts and colours, event wiring, then rebuild and reflash to see the result. Tools like LCD Wizard turn this into what-you-see-is-what-you-get: they build on the LVGL graphics library, let you design visually, and generate code you can integrate. This section covers how these visual GUI tools work, their applicability boundary, and the correct “generate → integrate → tune on hardware” flow. By the end you will be able to:

  • Judge when to use a visual GUI tool (LVGL/LCD Wizard class) over hand-coding a UI
  • Produce pages and widgets visually and generate maintainable code
  • Hook the generated code into an ESP-IDF/Arduino LVGL display pipeline
  • Avoid the “draws fine in the tool, cannot run on hardware” performance and memory traps
  • Completed the display basics of Chapter 15 (LVGL / screen drivers)
  • A touch-capable ESP32 display board (WaveShare-style LCD plus touch kit)
  • Awareness of the project’s display task, refresh rate, and buffer constraints
Aspect Hand code Visual tool
Layout / hierarchy Manual coordinates, trial and error Drag-and-drop WYSIWYG
Navigation / events Hand-written callbacks Configure interaction, generate skeleton
Resources (images/fonts) Manual conversion Built-in conversion and references
Underlying rendering Depends on LVGL Same LVGL, tool generates calls

Positioning: the tool accelerates the design expression; it does not replace integration and performance tuning.

The correct flow: design → generate → integrate → tune on hardware

Section titled “The correct flow: design → generate → integrate → tune on hardware”
  1. Design: plan pages, widgets, theme, and resources in the tool
  2. Generate: export LVGL C code (pages, widgets, event skeletons)
  3. Integrate: connect the generated code into the project’s existing LVGL backend (tick, flush, input device, display task)
  4. Tune on hardware: resolution/DPI, font size, refresh rate, and memory measured and adjusted on the target screen

Key point: generated code covers UI structure and events only; the display driver (SPI/parallel, touch, double buffering, task) you still wire up on the project side.

  1. Memory: LVGL buffers plus resources (large images, many fonts) eat RAM/PSRAM; small-RAM modules must cap image size, load on demand, and use PSRAM
  2. Refresh: full-screen large images do not redraw smoothly — rely on partial refresh, sensible buffers, and drop colour depth if needed
  3. Touch mapping: coordinate rotation/mirror mismatched with the display; calibrate at the driver layer
  4. Fonts and language: CJK font sets are large; subset them or render on demand

[Photos pending] Screenshots of the tool, on-device UI photos, and measured frame-rate/memory data are needed to support this; currently method only.

Check Expected result Verified
Generated code integrates and compiles Builds into the project and shows the UI
Touch works and maps correctly Taps hit the intended widgets
Refresh rate acceptable Slides/switches smooth enough on the target screen
Memory in budget RAM/PSRAM within the module
Resource strategy set Images/fonts loaded on demand or subset

Issue 1: smooth in the tool, laggy on hardware

Section titled “Issue 1: smooth in the tool, laggy on hardware”

Cause: small buffers, heavy colour depth/resources, no partial refresh.

Action: use PSRAM, double buffering, partial refresh; split large images or lower colour depth.

Issue 2: touch points do not match the display

Section titled “Issue 2: touch points do not match the display”

Cause: display and touch rotation/mirror settings disagree.

Action: unify the coordinate system in the display and touch drivers, calibrate, then feed LVGL input.

  • Do: use a visual tool for complex, heavily iterated UIs; hand-code simple ones
  • Do: treat generated code as a starting point — wire and tune the display driver yourself
  • Do: decide resource strategy early: on-demand loading, subsetting, PSRAM
  • Don’t: assume “draws in the tool” equals “runs on hardware”
  • Don’t: pile large images and fonts onto a low-memory module

Key points of this section:

  1. Visual tools (LVGL/LCD Wizard class) speed UI design and code generation, not integration or tuning
  2. Four-step flow: design, generate, integrate, tune on hardware — the key is a working display backend
  3. Main traps are memory and refresh: buffers, colour depth, resources, partial refresh, PSRAM
  4. Do not bring a heavy tool onto a simple UI; multi-page complex UIs get the most value

Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.

Talk to us →

First published attutorial.imagrove.com/project-smart-home/14-designing-touch-uis-with-lcd-wizard/Please credit Imagrove and link back to this page when quoting or republishing.

Questions or issues with this tutorial?

Sign in with GitHub to leave a comment. If a step fails for you, tell us — we verify it and update the tutorial.