logo elektroda
logo elektroda
X
logo elektroda

Video tutorial displays NEXTION

ekrzychoooo 47046 274

TL;DR

  • A new video guide for NEXTION displays is being created.
  • The guide is presented as a YouTube playlist.
  • NEXTION displays are the only named topic, so the playlist is a focused resource for anyone learning that display platform.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #271 21460911
    Slawek K.
    Level 35  
    Posts: 3015
    Help: 259
    Rate: 1299
    Ok, good luck :) .
  • ADVERTISEMENT
  • #272 21535156
    sylwekz
    Level 11  
    Posts: 33
    Rate: 1
    Hi. Is it possible to connect this HMI to a Delta PLC (via rs232) for communication (as with a standard HMI)?
  • ADVERTISEMENT
  • #273 21535601
    Slawek K.
    Level 35  
    Posts: 3015
    Help: 259
    Rate: 1299
    This display has its own protocol for communication, if this PLC supports it (which I doubt) then yes.
  • ADVERTISEMENT
  • #274 21542198
    spektra
    Level 18  
    Posts: 332
    Help: 10
    Rate: 60
    Welcome.

    Back on Elektroda after a very long break. I have started to follow the topic of this display. I have already committed several projects on it. I am currently working on a project for an aquarium controller - led beam 8 channels controlled by 12 bit PWM, time of day, reading pH, dH, water temperatures, power supply, beam, power monitoring of individual channels, 8 channel fertiliser dispenser, UV lamp control, external filter monitoring and control.

    However, I have a small conundrum, namely - how to read from the arduino (Mega 2560 MINI) the number of the currently loaded page on the NEXTION display ?

    Thank you and best regards
    Attachments:
    • Video tutorial displays NEXTION 20250507_150140.jpg (2.76 MB) You must be logged in to download this attachment.
    • Video tutorial displays NEXTION 20250507_150124.jpg (3.82 MB) You must be logged in to download this attachment.
    • Video tutorial displays NEXTION 20250503_213133.jpg (2.09 MB) You must be logged in to download this attachment.
  • #275 21542229
    spektra
    Level 18  
    Posts: 332
    Help: 10
    Rate: 60
    I have just figured out how to do this.
📢 Listen (AI):

Topic summary

✨ The discussion centers on creating and using video tutorials for NEXTION displays, focusing on practical implementation with Arduino and ESP8266/ESP-12 microcontrollers. Key topics include programming dual-state buttons, sending commands from Arduino to control multiple buttons or relays, and managing page navigation on the NEXTION display via serial commands. Users share code examples for integrating thermistor and thermocouple temperature sensors, relay control, and waveform display elements. Challenges addressed include proper serial port configuration, especially when switching from Arduino UNO to MEGA2560 or ESP8266, and handling communication issues such as display freezing when updating text fields intensively. The importance of correct object declarations, event handling (e.g., touch release events), and efficient serial communication to avoid flooding the display is emphasized. Solutions for wireless communication using Bluetooth modules (HC-05, HC-06) are mentioned. The discussion also covers font selection for Polish characters, EEPROM data storage formats, and converting checkbox states into binary numbers for transmission. Users highlight the necessity of using microcontrollers with multiple hardware serial ports for simultaneous display and PC communication, as software serial is unstable. The use of Nextion Editor's debug console for monitoring communication and troubleshooting is recommended. Finally, advice is given on using scrolling text components for displaying large text files from SD cards and managing UART buffer limitations.
Generated by the language model.

FAQ

TL;DR: “Send page 1 and it must work” [Elektroda, Slawek K., post #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., post #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?

  1. Read the new value into valNew.
  2. If valNew != valPrev, send it with pageX.obj.val=valNew.
  3. Set valPrev = valNew. This cuts serial traffic by ~50 % in logging tests [Elektroda, Slawek K., post #18690561]

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]
Generated by the language model.
ADVERTISEMENT