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):
  • #211 18918362
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    One picture. With the xpic command, you cut and display what you currently need.
  • ADVERTISEMENT
  • #212 18918385
    kaino
    Level 12  
    Posts: 35
    Rate: 1
    hmm, i still don't really know how to do it :)
  • #213 18918400
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    In the project, insert the same picture that you put here (containing all cases of progress bar).
    With the xpic command you can cut a fragment out of this image and display it on the screen. The xpic command can be used locally in the LCD or sent from eg arduino (sendcommand ("....")).
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #215 18918762
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • #216 18918858
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    You absolutely must have every 1%? I think that, as you showed in the previous picture, every 10% for a pest is not bad.
  • #217 18977476
    kuba2509
    Level 14  
    Posts: 100
    Help: 1
    Rate: 12
    Hello

    The first time I have to use this display, the project I want to copy is: http: //souliss.net/articles/DST/ I made the project and it works great but.
    In the project in the HMI file there are words in some exotic language I would like to change them. So I ask colleagues with more experience whether it can be done in Nextion Editor, or do I have to design the HMI file from scratch.

    best regards
  • #218 18977523
    Anonymous
    Level 1  
  • #219 18977529
    kuba2509
    Level 14  
    Posts: 100
    Help: 1
    Rate: 12
    Hello
    the file to display is on the page.
    Attachments:
    • DST_5.0.rar (620.94 KB) You must be logged in to download this attachment.
  • #220 18977601
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    I don't see any exotics in the display design itself. Paste the screen where you can see it.
  • #221 18977652
    kuba2509
    Level 14  
    Posts: 100
    Help: 1
    Rate: 12
    Hello

    On "page 1" upper left corner.
    On "page 2 and 3" everything in some language I don't know, probably Italian.
  • #222 18977681
    Anonymous
    Level 1  
  • #223 18977686
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    these are pictures. Replace them in some photo shop
    Link
  • #224 18977721
    kuba2509
    Level 14  
    Posts: 100
    Help: 1
    Rate: 12
    Approx.
    thanks for the hints i will try to do it.

    Added after 3 [hours] 24 [minutes]:

    Hello
    I took pictures in the right resolution and I had no problem with pasting them to the "picture" on the bottom left in Nextion Editor, so I have no problem with pasting them to the "page" on the right at the top.
    What am I doing wrong?
  • #225 18978373
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    Parameter sta in settings page you pass there image
    Parameter drink in settings page there you enter the index of the image
  • #226 18979610
    kuba2509
    Level 14  
    Posts: 100
    Help: 1
    Rate: 12
    Thank you for your help I managed to change it.
    best regards
  • #227 19001249
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    Good morning
    I need help. Someone could open the hmi file at home. There is one TextSelect element in the project and it causes NextionEditor to hang during compilation.
    I wanted to check if this only happens on my PC.
    TEST2.ZIP (16.59 MB)You must be logged in to download this attachment.
  • #228 19001255
    kaino
    Level 12  
    Posts: 35
    Rate: 1
    ekrzychoooo wrote:
    Good morning
    I need help. Someone could open the hmi file at home. There is one TextSelect element in the project and it causes NextionEditor to hang during compilation.
    I wanted to check if this only happens on my PC.


    I will go classic, I can see that you are combining with the new display
  • #229 19001297
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    kaino wrote:
    I will go classic, I can see that you are combining with the new display

    Well, if I change the drag attribute to yes, it hangs when compiling.
    I am using version V1.61.2 on Win7
  • #230 19001323
    Anonymous
    Level 1  
  • #231 19001334
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    On the new editor.

    Added after 1 [minutes]:

    OK thanks. I will try to reinstall.
  • #232 19364124
    doran5
    Level 8  
    Posts: 30
    Rate: 18
    Hello.
    I have the screen as you can see.
    At the bottom I have a numeric field n7, a text field t7 and a button that changes the type of timer with the code:
    
    n7.val+=1
    if(n7.val>4)
    {
      n7.val=1
    }
    if(n7.val==1)
    {
      t7.txt="monostab: 0 na 1"
    }
    if(n7.val==2)
    {
      t7.txt="monostab: 1 na 0"
    }
    if(n7.val==3)
    {
      t7.txt="generator od 0"
    }
    if(n7.val==4)
    {
      t7.txt="generator od 1"
    }
    



    There is also a timer on the page which after loading the page updates the string t7 according to the value of the numeric field n7 after loading the page
    Code:
    
    // ładuje opisy
    if(n7.val==1)
    {
      t7.txt="monostab: 0 na 1"
    }
    if(n7.val==2)
    {
      t7.txt="monostab: 1 na 0"
    }
    if(n7.val==3)
    {
      t7.txt="generator od 0"
    }
    if(n7.val==4)
    {
      t7.txt="generator od 1"
    }
    //////////////////////////////////
    if(n6.val==1)
    {
      t6.txt="tranzystor"
    }
    if(n6.val==2)
    {
      t6.txt="triak"
    }
    if(n6.val==3)
    {
      t6.txt="przekaŸnik"
    }
    if(n6.val==4)
    {
      t6.txt="beep"
    }
    
    
    Video tutorial displays NEXTION
    As I change the value in the first two X-type fields using any keyboard, the value of the generator type is reset to zero. (this also applies to the type of output)
    The question is where is the cause.
  • #233 19364138
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    Upload the HMI file here
  • #234 19364191
    doran5
    Level 8  
    Posts: 30
    Rate: 18
    I am attaching a file.
    Enter through the sym timer
    Attachments:
    • Kombajn1f.zip (49.41 KB) You must be logged in to download this attachment.
  • #235 19364231
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    Kombajn...zip (48.53 kB)You must be logged in to download this attachment.
  • #236 19364251
    doran5
    Level 8  
    Posts: 30
    Rate: 18
    Thanks for the fix, but what was the error?
  • #237 19364268
    ekrzychoooo
    Level 17  
    Posts: 279
    Help: 24
    Rate: 73
    I showed it in one of the films (local vs global, I think).
    The keyboard is the next screen and on returning from it all local variables are cleared and the global ones remain unchanged
  • #238 19364283
    doran5
    Level 8  
    Posts: 30
    Rate: 18
    Thanks, I'm only sitting in it for the 3rd day but it's still cool because the previous screen was 1000 lines on the UTF library.
    Sometimes, as always, he writes faster than I think and read.
    Greetings to AS
  • #239 19671728
    kuba5642
    Level 2  
    Posts: 3
    Hi,
    I have a nextion display from the intelligent and arduino mega series, I would like to use gps to display the current speed and distance traveled on the display. Could someone explain how to do this?
  • #240 19671744
    Slawek K.
    Level 35  
    Posts: 3015
    Help: 259
    Rate: 1299
    Take a look at the tutorials in this thread and you will have the knowledge how to do it.

    Greetings
📢 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