logo elektroda
logo elektroda
X
logo elektroda

Video tutorial displays NEXTION

ekrzychoooo 40860 274
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #181 18657708
    kamilzkamil
    Level 7  
    Slawek K. wrote:
    In the Nextion.h file, find:
    #include NexUpload.h
    and comment:
    // # include NexUpload.h

    Greetings


    I read somewhere about it, unfortunately this file does not contain the mentioned fragment

    Code: C / C++
    Log in, to see the code
  • ADVERTISEMENT
  • #182 18657905
    Slawek K.
    Level 35  
    Show me the compilation error.
    Rename or delete the files NexUpload.cpp and NexUpload.h to NexUpload.cpp.txt and NexUpload.h.txt and compile.
    After this operation, the compilation was successful for me (Nodemcu-32s board)

    Video tutorial displays NEXTION

    Greetings
  • #183 18658683
    kamilzkamil
    Level 7  
    It seems that I changed the name of the files, but the original files with this name were also, after removing them everything works, thank you very much, probably everything works as it should :) usually I also chose the ESP 32 Dev Module board

    if you can still ask a question in the NexConfig.h file all series should be accessed? does it matter any more?
  • ADVERTISEMENT
  • #184 18658878
    Slawek K.
    Level 35  
    Disable Debug (DBserial) unless you use it.

    Greetings
  • #185 18689963
    bobby25p
    Level 2  
    Hello, thanks for the Nextion tutorial cool thing, I have a HMI project with 4 pages, page0 main menu no data only buttons: to page 1 2 and 3, page 1 values from 3 sensors, page 2 values from 2 sensors, page 3 values from 3 sensors now I have a question Is Arduino sending all the values from sensors all the time (8) or better only those for the page on which the display is?
  • #186 18690277
    Slawek K.
    Level 35  
    So as not to burden usart unnecessarily, send only those that are needed, and also only when their value has changed.

    Greetings
  • #187 18690398
    kamilzkamil
    Level 7  
    I have a similar problem, I made a clock that is displayed, but when I added the ds18b20 thermometer, the seconds started to appear every 3 seconds and it is impossible to change the date configuration because nothing reacts.

    I'm not a programmer, is there a chance that someone could provide an example of sending data to nextion only if they change, which I will be able to adapt to my own needs?
  • #188 18690561
    Slawek K.
    Level 35  
    It is simple. You create two variables, e.g. temperature and temperature_pres, and do this:

    Code: C / C++
    Log in, to see the code


    And a simple send to Nextion function might look like this:

    Code: C / C++
    Log in, to see the code

    And calling it like this:

    Code: C / C++
    Log in, to see the code

    Where the first argument is the page number, the second argument is the name of the object in nextion, and the third is an integer value.


    Greetings
  • #189 18693938
    PiotrPitucha
    Level 34  
    Hello
    Probably I was looking wrong, but where are the font sizes in the text field?
    I wanted to turn a string like "temperature =" 45 "° C" into a string, unless there is some neat way to break it down into separate numeric and text fields, respecting the aspect ratio of letters and numbers.
  • ADVERTISEMENT
  • #190 18694091
    Slawek K.
    Level 35  
    The front number must be entered in the Font field. You have the fonts on the bottom left, they are added there using the generator which is available from the menu bar. I recommend the Lucida console font which is the most proportional. I do it so that the value in the text field (or numeric if integers) is right justified, and the unit in the next field is left justified. I put the fields next to each other without any space.

    Greetings
  • #191 18698480
    PiotrPitucha
    Level 34  
    Hello
    Thanks to Sławek, your concept is good because it saves the processor from unnecessary conversions to a string.
    I am impressed with your form of communication, if the instructions for the equipment were written in this way!
    best regards
  • #192 18735908
    PiotrPitucha
    Level 34  
    Hello
    Is it possible to simulate a specific display in the Nextion Editor?
    I'm making a field layout for a large display that's on the way :) , let's say I have a * .HMI file, I enter the editor in DEBUG and I would like to see what is on the Nextion 7 "display on the computer screen. I will not use touch, in DEBUG I have a static image and I would like to see what Arduino will do on the real display.
    Everything is fine with the program itself, but at 2.4 "without a magnifying glass I can not cope and on the computer screen I have a very good approximation of the display size.
  • ADVERTISEMENT
  • #193 18735931
    Slawek K.
    Level 35  
    click on Debug, then at the bottom of the User MCU input page, select COM, baud and click Start.
    Of course you connect arduino to COM, and anything normally arduino would send is Nextion, you will see on PC and values will change. You can also see thongs and bugs, great thing, I recommend it.

    Video tutorial displays NEXTION

    Greetings
  • #194 18736016
    PiotrPitucha
    Level 34  
    Hello
    That's exactly what I do and nothing happens :(
    I wonder if there are any limits to the transmission speed, I have the display at 115200, Arduino Mega at 9600 because I read somewhere that the debug must be at 9600 and nothing :( .
    I'll try to change the display to 9600.
    Thanks

    Ps. I found the original program on which I used to debug, the display still does not work, but the connection is established and HEXy in the windows fly :) .
    Apparently some function is bothering with debugging, I will comment on individual tasks until the connection is established, because the serial definitions in both versions of the program are identical, just like nexconfig.h is unchanged
    best regards
  • #195 18736116
    Slawek K.
    Level 35  
    Don't use debugs in nexConfig.h
    Just act as if you had a PC program instead of a connected LCD Nextion. Baud in arduino must be identical to LCD.
    On the start page, on the LCD side, in the Preinitialize Event tab set the parameter:
    bauds = 115200
    Of course, while entering the speed you want, set arduino for Serial identically.

    It must work as long as you are sending data to Nextion in the correct format.

    Greetings
  • #196 18762676
    Mariuszwsosp
    Level 7  
    Hello. I am asking for advice. On page 0 I have a binary button which I use to switch on the receiver on the Arduino output. The button physically works, switches from OFF to ON position, and so does the receiver. However, when I go to the next page of the display and return to the page with the button, the receiver is still turned on, which is ok, but the button itself is displayed in the initial position, i.e. OFF. How to understand the display of the state after touching the button so that it is in this state, regardless of whether I go through the sides of the display and change the state only after touching it again?
  • #197 18762712
    Anonymous
    Level 1  
  • #198 18762890
    Slawek K.
    Level 35  
    The variable must be of a global type. In the button going to the next page you save the button state to this variable, when you return to page 0, you save the state read from the variable to the button. You need to put this in the Preinitialize tab of page 0.

    Greetings
  • #199 18763283
    Mariuszwsosp
    Level 7  
    The variable must be of a global type.

    Yes. While at work, I thought about using a global type variable. After returning home, I changed and it works as I want.

    Buddy Sławek K, you were right :)

    I greet everyone. I will probably ask for help more than once, and later maybe with an answer to the question of other colleagues? Practice makes perfect :)
  • #200 18829514
    Mariuszwsosp
    Level 7  
    I am asking for help in carrying out the following task.
    Nextion and Arduino Mega display.
    On the display I have a variable to set the time for which the Arduino output is to be turned on, and the ability to select individual outputs depending on the need for a given moment. Number of outputs 32. Select outputs with buttons on Nextion. For example: I set the time of 10 minutes and select the output No. 2, 4, 5, 6, 8, 16, 20, 28. At the beginning, output No. 2 is turned on for the set 10 minutes, after this time, 2 turns off and turns on the next selected on set time etc. If output 28 is reached the program is finished.
    I am asking for help on how to deal with Nextion and Arduino.
  • #201 18895101
    kaino
    Level 12  
    I have a question ,

    how to make such a function in the PROGRESS BAR

    I have a timer I set it to 160 seconds and there is a countdown

    I would like the PROGRES bar process to be set the other way around, ie 0 -160 A 160-0
  • #202 18896587
    ekrzychoooo
    Level 17  
    Post your code that doesn't work for you.
    Maybe such a code:
    Code: C / C++
    Log in, to see the code
  • #203 18898359
    kaino
    Level 12  
    ekrzychoooo wrote:
    Post your code that doesn't work for you.
    Maybe such a code:
    Code: C / C++
    Log in, to see the code


    but time is constant :) i.e.

    these are countdown timers I gave example 160 but it depends what the user sets
  • #204 18898441
    ekrzychoooo
    Level 17  
    Divide that by what the villain sets.
    Code: C / C++
    Log in, to see the code


    Show the code that doesn't work for you.
  • #205 18903353
    kaino
    Level 12  
    Code: C / C++
    Log in, to see the code


    Lengthoftitle - all timer time
    actualSeconds countdown seconds

    [/ code]
  • #206 18903479
    ekrzychoooo
    Level 17  
    I suspect that this is a fragment of some larger code./?
  • #207 18908039
    codec
    Level 12  
    I am asking for help in marrying the finished firmware with the Nextion display. While I can deal with the display itself, I have a problem to understand the venom to display the variables that are sent from the controller (Arduino firmware).
    Firmware can be found at this link -> https://github.com/mkovero/7226ctrl
    The ui.cpp tab contains data sent after the series. For example, the rotation or the position of the jack
    Serial.print (sensor.curRPM);
    Serial.print (gear);
    I made 2 float frames in Nextion. The first one with id3 objname RPM, the second id4, objname GEAR
    How to combine it with each other?
  • #208 18918189
    kaino
    Level 12  
    anyone has an idea how to make such a progressbar display?

    Video tutorial displays NEXTION
  • #210 18918328
    kaino
    Level 12  
    yes, I know it, but too many pictures would have to be displayed in 5 minutes

Topic summary

A new video tutorial series for NEXTION displays is being developed, focusing on various functionalities and programming techniques. Users discuss the capabilities of NEXTION displays, including sending commands, managing timers, and handling multiple pages. Key topics include using buttons to control outputs, sending data from Arduino to NEXTION, and managing display states across different pages. Users share code snippets for specific tasks, such as updating text fields based on variable values and implementing timers. There are also discussions about troubleshooting issues related to memory usage on Arduino, interfacing with GPS modules, and optimizing communication between Arduino and NEXTION displays.
Summary generated by the language model.
ADVERTISEMENT