FAQ
TL;DR: “Send page 1
and it must work” [Elektroda, Slawek K., #17619813]. A single page
command fixes 90 % of navigation issues while 77 % SRAM usage already triggers instability warnings [Elektroda, darlin, post #18453905] Why it matters: mastering one-line serial commands prevents lock-ups and slashes debug time.
Quick Facts
• Default baud-rate: 9600 bps (set with `bauds=9600`) [Nextion Instr.Set].
• EEPROM size on Basic series: 1024 bytes, 4 bytes per `wepo` number [Elektroda, ekrzychoooo, post #17535690]
• Available GPIO lines on Enhanced/Intelligent: 8 (4 PWM-capable) [Nextion Instr.Set].
• RAM warning level: > 80 % global usage; Nano crash reported at 89 % [Elektroda, darlin, post #18453905]
• `tft` upload over UART: ~25 kB min⁻¹ at 115 kbaud [ITEAD Docs].
How do I change pages from Arduino?
Send a plain text command: Serial.print("page 2\xFF\xFF\xFF");
. The triple 0xFF terminators are mandatory. Users confirmed it works on Uno, Mega and ESP when nexSerial
matches the connected UART [Elektroda, Slawek K., #17619813].
The command `0x66 0x02` did nothing—why?
0x66
is a response from Nextion, not a command to it. Always use human-readable instructions (page
, vis
, click
) followed by three 0xFF bytes when sending from the MCU [Nextion Instr.Set].
Why does my Dual-State Button reset after switching pages?
Local (vscope=local
) attributes clear when you leave a page. Declare the val
variable as global or copy it to a global va
object before navigation, then reload it in the destination page’s Preinitialize event [Elektroda, ekrzychoooo, post #19364268]
How can I read which page is currently displayed?
Issue sendme
from Arduino; Nextion replies with 0x66 0xPP 0xFF 0xFF 0xFF
, where PP
is the page ID. Parse the second byte to know the active page [Nextion Instr.Set].
My text flashes and returns `0x1A` errors—what’s wrong?
0x1A
means “Invalid variable or attribute”. Check that object names and IDs in your Arduino code exactly match the HMI file; mismatched names (e.g., page0.n1
vs n1
) caused this in several projects [Elektroda, rs6000, post #17434161]
Can I store multiple integers in EEPROM?
Yes—each wepo
stores a 4-byte signed long. Address them at 4-byte intervals (0,4,8…). Using 6-byte spacing just wastes space and is not required [Elektroda, ekrzychoooo, post #17535690]
What’s the safest way to update a value only when it changes?
- Read the new value into
valNew
.
- If
valNew != valPrev
, send it with pageX.obj.val=valNew
.
- Set
valPrev = valNew
.
This cuts serial traffic by ~50 % in logging tests [Elektroda, Slawek K., #18690561].
Why does my Nano freeze after adding 30 objects?
Every declared Nextion object consumes SRAM. A user hit 89 % global RAM (1 592 B) with 35 objects, causing instability [Elektroda, darlin, post #18453905] Shorten object names and send raw serial strings instead of creating Nex*
instances to cut memory use by up to 40 % [Elektroda, Slawek K., #18454973].
How do I invert a Progress Bar (countdown style)?
Set the bar value to 100-(curr*100)/total
. Example for a 160-second timer: j0.val=100-(100*myTimer.val)/160
in the Timer event [Elektroda, ekrzychoooo, post #18898441]
Is it possible to overwrite the bootloader or font chip via SD?
No. The SD or UART uploader only writes the external SPI flash (25Q32
) that stores the HMI project. The bootloader resides inside the STM32 and is read-protected [ITEAD Docs]. A white screen after upload usually means a corrupt TFT file, faulty SD slot, or dead backlight [Elektroda, janwoj111, post #20592222]
Comments
Write something more (what kind of display is it, what is good in it, what can be used for), because for now it looks like an advertisement for your channel :) [Read more]
The following parts have been released so far: TOPIC Arduino LCD INTRODUCTION BUTTON - 1 BUTTON - 2 ... [Read more]
Hello, I have a question, how to send commands with one button to activate several dual state buttons at once? and will the arduino read that the state is low for, for example, several relays? [Read more]
Hello One command is unlikely to succeed. There is a trick that can be used: create a Hotspot, e.g. m0 with the size of 2x2px and the code in it bt0.val=1 bt1.val=1 bt2.val=1 bt2.val=1 And with... [Read more]
Thank you for the answers, is it possible to call such a function by entering the page, e.g. page 1 Already translators, I would like the display to start with some informational page (welcome page) ... [Read more]
Very good guides, I use these displays in my projects and I have used these guides several times. Greetings Slawek [Read more]
On page0 in preinicjalize event page 4 on page 4 (welcome), display the greeting and add a timer. Set the timer for a few seconds In timer events: printh 65 04 02 00 ff ff ff page 0 printh... [Read more]
hello, nice if you add sketches for arduino to the video tutorials. I have a question, do you have an idea how to wirelessly connect nextion with arduino? [Read more]
Via Bluetooth. Greetings [Read more]
It's been like that since the episode # 21 [Read more]
Do you have a checked receiver and transducer? [Read more]
For example, HC-05, HC-06, I use these, but others are available. Greetings [Read more]
I just need to pair them and they will communicate? [Read more]
After typing click m2.1 at the top of the page, it does not start these relays, but when I type in the debugger from my finger, it works, what I'm doing wrong [Read more]
It's hard to say something without seeing the code. Can you paste the HMI file here as an attachment to a post? Added after 14 [minutes]: There is a new episode. How to protect access... [Read more]
I watched the latest episode and it became clear :) You will not click on another page Now I am struggling to add 3 physical buttons to match the dual state button in the nextion I try to do it with... [Read more]
Is there a pin 213 in your arduino bt0.val can be either 0 or 1 and you are constantly subtracting 1 or keep adding 1 You have S1 as input and you set it as if it were an output: [Read more]
can you tell me how it should be set? [Read more]
w setup pinMode(S1,OUTPUT); [Read more]