How to use them? (from nextion's page)
How to use them? (from nextion's page)
Czy wolisz polską wersję strony elektroda?
Nie, dziękuję Przekieruj mnie tamdarlin wrote:Global variables use 1594 bytes (77%) of dynamic memory
darlin wrote:I think in one of the films I said something about the influence of the name length on the RAM occupancy (maybe it was live). On the one hand, long names are cool, but on the other hand, they have to be remembered because the nextion library matches objects by name, not by ID (sucks a bit, but it is)."set.n0"
darlin wrote:why?NextChecbox is only two bits after all
darlin wrote:suggestion Serial.print and names maybe will solve my problem.
TL;DR: “Send
page 1and it must work” [Elektroda, Slawek K., post #17619813] A singlepagecommand 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.
• 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].
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., post #17619813]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].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]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].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]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]valNew.valNew != valPrev, send it with pageX.obj.val=valNew.valPrev = valNew.
This cuts serial traffic by ~50 % in logging tests [Elektroda, Slawek K., post #18690561]Nex* instances to cut memory use by up to 40 % [Elektroda, Slawek K., post #18454973]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]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]