#72 Nextion Display changing items dynamically NO Nextion Library Nextion tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 57

  • @kennyrobert5009
    @kennyrobert5009 11 หลายเดือนก่อน +1

    So helpful! Thank you for taking the time to make these videos!

    • @CheapControls
      @CheapControls  11 หลายเดือนก่อน

      Glad you like them! It has been awhile since I made one. I hope to start again soon.

  • @javieracosta1218
    @javieracosta1218 3 ปีที่แล้ว +1

    thanks, your explanations are amazing, the best Nextion tutorials

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      Glad you like them! Thanks for watching

  • @iotcrunch8701
    @iotcrunch8701 4 ปีที่แล้ว +2

    Really helpful video. Thank you.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      Your Welcome, We appreciate the kind words.

  • @HSter0
    @HSter0 4 ปีที่แล้ว +1

    Firstly, I really like your videos - succinct, well paced, individual to each function, so have been very useful to apply based on what's needed considering I am new to Nextion displays, more grease to your elbows!
    Secondly, and I'm not sure if this was answered already, but why was the colour change not implemented within say the timer within the display. That way, more code space on the Arduino can be freed up as well.
    I tried it with the following, and it seems to work, but am having issues with dual condition solving within the if statement. Here's my code, perhaps I'm not seeing what the issue is:
    Here's the code that works (if less than 25, progress bar colour should be red, am doing a tank level indication in my case):
    if(j0.val

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      1) your color question. In some of my videos, I don't do things the "best" or most efficient way. If I want to focus on one issue sometimes I don't want to complicate a video by bringing up a secondary issue. I can not remember why I did what I did in this video. Thanks for watching. I will answer your other questions in a different reply.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      I am not sure why you are getting the error. I ran the same code you have and it is working fine on my compiler. Consider joining the Cheap Controls private Facebook group. You would have access to an email address that you can upload the HMI file for review.

  • @JonMcPhalen
    @JonMcPhalen 3 ปีที่แล้ว +1

    I find coding on the micro end (I use the Propeller 1 & 2) easier when renaming the widgets in the Nextion IDE. in your example, I would change the name of the progress bar widget from "j0" (meaningless in code) to "pbarLevel" That way you can send the string "pbarLevel.val=" (followed by string version of value and terminating chars) and the microcontroller code becomes more obvious. Since so many widget fields are numbers, I have a method that lets me send a number to any of them by passing a string (defines widget name and field) and the new value.

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      That is a good tip. Thanks for watching and taking the time to offer advice.

  • @DianaMartinez-su6jh
    @DianaMartinez-su6jh ปีที่แล้ว +1

    Hi again. Still loving your tutorials!!! I'm thinking of trying to alter the variables of picc and picc 2 (the same way you alter j0 and t0) for a double state button. I'll comment here how it goes :)
    Could you put the files of this one on the old website, please? Thanks a lot!!!

    • @CheapControls
      @CheapControls  ปีที่แล้ว

      I just uploaded them. Let me know if you have any issues. Good luck with your project. I am sure you will figure it out.

  • @MrSimmoco
    @MrSimmoco 3 ปีที่แล้ว +1

    Hey CC!!!! I would like to have my oil temperature progress bar start with yellow at the low temperature then turn green in the normal running area then yellow again and finally red. Any thoughts?

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      You can set a multi color background image and then have a forward image scroll over it. Thanks for watching.

  • @chetanwaghmare
    @chetanwaghmare 4 ปีที่แล้ว +1

    Thanks for the video and I like the way you explain. The syntax for displaying text is really tricky as you said. Can you please guide how to pass the String variable value to t0.txt (as per your example) instead of hard coded value to get displayed on nextion.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      I will be adding a video labeled #07b with that information in the next few days.

  • @jessemackenzie6516
    @jessemackenzie6516 4 หลายเดือนก่อน

    Why do you add serial,write 0cff 3 times in a row?

  • @MrSimmoco
    @MrSimmoco 3 ปีที่แล้ว +1

    Hey CC, this tutorial fits exactly what i was looking for to build an engine monitoring system for my ultralight with a Rotax ULS 912 power plant. Would there be any benefit to having the Nextion do the heavy lifting polling the Arduino for the data or is the way you have shown ok for the Arduino doing the majority? Great work funny guy!!!! 🤣🤣🤣 Cheers mate 👍👍👍

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว +1

      I usually look at the risk. If I am monitoring something important I put the control as close to the thing I am controlling. If there is not much risk of injury or damage I will look at using the Nextion for control. I am currently looking into making more videos on direct control with the Nextion. So I guess I can't really answer your question specifically. I do want to thank you for watching.

  • @sgdingman
    @sgdingman 2 ปีที่แล้ว

    What a very informative video. In this video your explanation of the use of the (\) null character is to tell the compiler to ignore the quotes. Do you mean the Arduino compiler? If so, this tells me that the Arduino has a problem with the quotes, but the Nextion requires that the text be surrounded by quotes. How does the Nextion know that the (\) is only for the Arduino compiler?

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      When sending text like t0.txt="TEXT" you need quotes. The only way the Arduino can send quotes out the Serial port is to add an escape character. The backslash is the escape character. If you just have quotes they will be ignored. The backslash is also if ignored. If you sent t0.txt="text" would send t0.txt=text which would not work but t0.txt=\"text\" would send t0.txt="text" the backslashes would not be sent. if you want to send a backslash you would have to send two backslashes to get a single backslash. It is hard to explain.

    • @sgdingman
      @sgdingman 2 ปีที่แล้ว

      @@CheapControls Thank you Mark.

  • @tillytony
    @tillytony ปีที่แล้ว

    Could you help please? Im really stuck! I can get a page with a single value and txt boxe updating. But i have built up a more complaxe project and now the numbers only get sent for a single frame. If i leave the page and come back, they will update again but then stop. If im on a page that doesnt have any of the boxes im sending data too, i can see the arduino flicker away and the editor mcu recieving the data. But once i go to any screen that has a box with the id im updating, it will update once and stop. The last thing i need to get working are potentiometer values sending to a number box and cant for the life of me figure out why it stops updating.

    • @CheapControls
      @CheapControls  ปีที่แล้ว

      Do you have the Nextion components set to Global? I have a help section on the Cheap Controls webpage where you can submit a question. I will reply and at that point, you can submit your code for review.

    • @tillytony
      @tillytony ปีที่แล้ว

      @@CheapControls You are incredible. I will do a test and report back.

  • @svin3819
    @svin3819 4 ปีที่แล้ว +1

    Love the videos! Can I ask how you got all the tools in editor? I dont have all the stuff you have and cant seem to find a library or anything to add more. Also I cant seem to grab the corner of the boxes like you can with the diagonal arrows and drag. It only gives me right side and bottom. Arrows wont show on top or left side. And it wont let me adjudt box size by typeing it in gives me error messages.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      I assume you are talking about the Nextion Editor. I am using it as I downloaded it(no additions). What version are you using? If you want to go to Facebook and look up my private cheap controls group. If you join you can post some screenshots that may make it easier to assist.

    • @svin3819
      @svin3819 4 ปีที่แล้ว +1

      Yeah i ask it to check for updates, but nothing was coming up. So I just unistalled and downloaded 59. That was the problem. Do you make videos on learning the code? I really like your videos and I am very new at all of this, and trying to learn it.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      @@svin3819 When you write "learning the code" do you mean Nextion or Arduino?

    • @svin3819
      @svin3819 4 ปีที่แล้ว

      @@CheapControls both I am very new to computer code.

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว +1

      @@svin3819 I will think about it over the weekend and see if I can come up with something. Thank you for the idea of a new video series.

  • @jmch1369
    @jmch1369 ปีที่แล้ว

    Thank you,,

  • @edo-diy8086
    @edo-diy8086 4 ปีที่แล้ว +1

    can you tell me how to get the pco value t0.pco=63488, i will use this to get collor picker on RGB sensor, so i need the convert the rgb to pco value, but i didnt know pco value can get from where.., can you help me.?

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      I am not sure what you are asking. Are you wondering how to send the value from the Arduino to the Nextion or are you asking how to send a get request to get the value?

    • @edo-diy8086
      @edo-diy8086 4 ปีที่แล้ว +1

      ya thats what i mean, i want to send pco value from arduino, which is, i need to convert value from R, G, B value to PCO. but i dont know keysearch to get the formula.

    • @edo-diy8086
      @edo-diy8086 4 ปีที่แล้ว

      so PCO can be set as floating value, not just writing in the code as simple as that.

    • @edo-diy8086
      @edo-diy8086 4 ปีที่แล้ว

      how to send a get request to get the value maybe like what i mean.? can you help?

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      What model of sensor are you using. I think this sounds interesting. I am sure I can figure it out.

  • @prashantat5938
    @prashantat5938 4 ปีที่แล้ว +1

    how to changes pages example page 0 to page 5
    for each 1 minute automatically please guide me

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว +1

      You could add a timer to each page then place the page change code in each timer instance. Having a timer on each page would also allow you to select the order that they change. Good luck

  • @leedsretrofitsltd8134
    @leedsretrofitsltd8134 4 ปีที่แล้ว +1

    10bit analogRead starts from 0 and and on 1023 which is 1024 steps

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      Very true statement. Thanks for watching.