Nextion NX3224T028: Dashboard Template (Gate 107)
This page is a deterministic build sheet for creating a working Nextion HMI in Nextion Editor for the display NX3224T028 (2.8" 320×240 touch).
Target firmware/driver: sensor_nx3224t028_nextion_uart on Gate 107.
0) Assumptions
- Display:
NX3224T028(touch) - UART baud:
9600 - MCU: RAK3112 UART mapping:
TX=GPIO9,RX=GPIO10 - Note: RAK3112 does not expose
GPIO15/GPIO16.
1) Project setup (Nextion Editor)
- Create a new project
- Device:
NX3224T028 - Resolution: 320×240
- Baud:
9600
- Device:
Required project settings (don’t skip)
Enable ID reporting so the firmware receives 0x65 touch events:
- Send Component ID: ON
- Return Page ID: ON
- Prefer Release events (not Press) for all buttons
2) Pages
Create exactly two pages:
page0— Dashboard (page id0)page1— Config (page id1)
Page preinitialize events (required)
Set these in Nextion Editor:
page0 Preinitialize:sendmepage1 Preinitialize:sendme
3) Component map (names + fixed IDs)
page0 (Dashboard)
| Name | Type | Component ID | Notes |
|---|---|---|---|
bStart | Button | 2 | Start streaming |
bStop | Button | 3 | Stop streaming |
bCfg | Button | 4 | Go to config page |
tStat | Text | 6 | Status text |
tLast | Text | 7 | Last parsed event / last touch |
nTx | Number | 8 | TX counter |
nRx | Number | 9 | RX counter |
nPg | Number | 10 | Current page indicator |
tErr | Text | 11 | Debug/error string (recommended) |
page1 (Config)
| Name | Type | Component ID | Notes |
|---|---|---|---|
bHome | Button | 5 | Return to dashboard |
Why fixed IDs? It prevents drift and makes debugging repeatable across project edits.
4) Event behavior map (what each button does)
Use Release event handlers.
page0 events
bStart (id=2) release→ board sets streamRUNbStop (id=3) release→ board sets streamSTOPbCfg (id=4) release→ board sendspage 1
page1 events
bHome (id=5) release→ board sendspage 0
Note: The firmware is the source of truth for navigation. The HMI should emit events; the board decides actions.
5) Recommended initial values
Set these once in the editor:
tStat.txt = "BOOT"tLast.txt = "P- C- E-"tErr.txt = ""(empty)nTx.val = 0nRx.val = 0nPg.val = 0
6) Build + upload
- Compile in Nextion Editor.
- Upload generated
.tft:- SD card, or
- serial upload
- Reboot the display.
7) Firmware run + validation
cd firmware
source ~/esp/esp-idf/export.sh
idf.py -B build_nx3224t028_nextion -p /dev/cu.usbmodem11101 flash monitor
Expected indicators:
APP_MAIN: active_gate=107NX3224: Nextion init ok ... map:start(p0,c2),stop(p0,c3),cfg(p0,c4),home(p1,c5)sensor=nx3224t028_nextion ... touch_count:<n> ... last_touch_page:<n> ... last_touch_comp:<n> ...
Troubleshooting:
- If
touch_countnever increments:- project settings likely not emitting
0x65(Component/Page ID reporting not enabled), or - UART wiring/baud mismatch.
- project settings likely not emitting
- If
last_code:0x1Aappears repeatedly:- dashboard is missing one or more widgets (
tStat,tLast,nTx,nRx,nPg,tErr), or - component names/IDs don’t match exactly.
- dashboard is missing one or more widgets (
Printable Nextion Editor Checklist (NX3224T028 / Gate 107)
Print this page (browser Print → “Save as PDF”) and use it as a shop-floor checklist.
A) Project
- New project created
- Device set to NX3224T028 (320×240)
- Baud set to 9600
- Settings: Send Component ID = ON
- Settings: Return Page ID = ON
B) Pages
-
page0exists, page id =0 -
page1exists, page id =1 -
page0 Preinitializecontainssendme -
page1 Preinitializecontainssendme
C) Components + IDs
page0
-
bStartButton id=2 -
bStopButton id=3 -
bCfgButton id=4 -
tStatText id=6 -
tLastText id=7 -
nTxNumber id=8 -
nRxNumber id=9 -
nPgNumber id=10 -
tErrText id=11
page1
-
bHomeButton id=5
D) Defaults
-
tStat.txt = BOOT -
tLast.txt = P- C- E- -
tErr.txt = "" -
nTx.val = 0 -
nRx.val = 0 -
nPg.val = 0
E) Build + flash
- Compile OK (no editor errors)
-
.tftuploaded - Display rebooted
F) Firmware validation
- Serial log shows
active_gate=107 - Touch events increment
touch_count -
last_touch_page+last_touch_compmatch expectations