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
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.
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.
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.
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!!!
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?
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.
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 👍👍👍
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.
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?
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.
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.
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.
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.
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.
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.
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.?
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?
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.
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
So helpful! Thank you for taking the time to make these videos!
Glad you like them! It has been awhile since I made one. I hope to start again soon.
thanks, your explanations are amazing, the best Nextion tutorials
Glad you like them! Thanks for watching
Really helpful video. Thank you.
Your Welcome, We appreciate the kind words.
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
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.
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.
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.
That is a good tip. Thanks for watching and taking the time to offer advice.
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!!!
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.
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?
You can set a multi color background image and then have a forward image scroll over it. Thanks for watching.
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.
I will be adding a video labeled #07b with that information in the next few days.
Why do you add serial,write 0cff 3 times in a row?
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 👍👍👍
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.
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?
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.
@@CheapControls Thank you Mark.
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.
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.
@@CheapControls You are incredible. I will do a test and report back.
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.
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.
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.
@@svin3819 When you write "learning the code" do you mean Nextion or Arduino?
@@CheapControls both I am very new to computer code.
@@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.
Thank you,,
You are welcome!
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.?
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?
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.
so PCO can be set as floating value, not just writing in the code as simple as that.
how to send a get request to get the value maybe like what i mean.? can you help?
What model of sensor are you using. I think this sounds interesting. I am sure I can figure it out.
how to changes pages example page 0 to page 5
for each 1 minute automatically please guide me
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
10bit analogRead starts from 0 and and on 1023 which is 1024 steps
Very true statement. Thanks for watching.