Thanks for your continued support. I am still looking into those links you posted. I am reworking the main website first and switcing over my Patreon so if I follow your advice I will be ready to go.
Greetings! Thankyou for this wonderful tutorial of yours. I have a question, though. I have a project set up like this: a relay controlled by a nextion display containing two pages, the first one is for the logo and the second is for the buttons. For the buttons, I use a dual-state-butons to control the status of the relay so when you click the button, the status of the relay triggers ON and persists until I click the button again. My problem is that when I go back to the first page containing the logo while a button is clicked on the second page, the status of the button in the second page resets while my relay continues to be ON. So it seems the use of dual state buttons is compromised. Do you know what should i do to to fix my problem? Thank you for your insight.
You need change the scope from local to global. You should see this in the attributes of the dual state button. thank you for the kind words and good luck with your project.
This is such a great tutorial! Im having touble finding the files for download. I found the video in the old website, but there are no links for downoading files, am I looking for them in the wrong place?
That is an older video. I don't have all the files for every video loaded. But I will load them as people request. I just uploaded the files. the should be available now. I could not remember which Arduino file I used in the video. I have two uploaded. I hope one will work for you. If not let me know and I will try to figure out how to help better. thank you for your kind words.
Hi. great work with all the videos! Hope you can help... I am trying really hard to find a video to see 2 dual-state buttons turning on 2 separate LEDs. This is all I will need in my project for now, but I can't find how to do this. I find many videos of how to use a dual-state button to turn on 1 LED, but nowhere about multiple dual-state buttons... Please help....
See if this video helps th-cam.com/video/IsRS8MRLBgQ/w-d-xo.html. If you want a code review consider connecting to me over on www.cheapcontrols.com on the help page.
hi, I want to trigger Nextion button from arduino, not per hand on the display. do you know, how to trigger dual button from arduino to Nextion display.
Hi, sorry if I persist with the questions but I can't understand, if I only have a "dual state button" how can I send the two states separately to arduino to make him do a different action for each state? I have performed many tests but I cannot understand how to do it. I'm a tough head :-)
Ok, I found the solution, I don't know if it's right or it can be done better but it works, just add these lines in Nextion Editor to send the two different states: if(bt1.val==1) { print "vaporeON" }else if(bt1.val==0) { print "vaporeOFF" }
@@CheapControls As I uderstand, the difference in the case above you can program whatever you want inside the if and that will be done on the nextion side before sending something to the arduino, and in the case on the video the nextion sends a 0 or a 1 when the button is pressed and then you can program whatever you want to do with that on the arduino side, right? Sorry for the many questions, Im just beggining to understand how this works
@@DianaMartinez-su6jh That logic is correct. but I would not just send a 0 or 1. I send it in a key-value pair with a beginning and end parameter. like C:CTST0? starting parameter C:C then the command being TST then the value of 0 then the ending delimiter of ?
hi there I copy and paste the code_5 from the text file to Arduino, and verify it show this message (error: 'Serial2' was not declared in this scope) I don't know what I have missed! Can you please help me?
My videos use a mega. you will need to add a library and alter the code a bit for the UNO. The mega has extra built in serial ports that the UNO does not have. It is not difficult to use with an UNO. I will post a second reply here with the library. I will also post an different file for the UNO. I am not on my development laptop but will be later.
@@daryl7237 I have the code up at Cheap Controls for download(The links look identical but if you hover over them you will see one will say UNO in the file name). I will work on creating a separate image for UNO versus MEGA. You will notice two new lines at the top of the code. This is for the softserial library. Then in the code Serial2 is replaced with mySerial. You will use pins 2 and 3 for the additional Serial Port.
what the code should look like if I would like to control the LEDs with buttons. without flashing, only send data from nextion to Arduino - enable or disable with the button and by the way, can't download files from the site
I am rebuilding the site. You are the second person to ask about downloading the files. I did not think people were going to the site for the files. I will add a link to the old site on the new one and fix the links in the youtube videos. I appreciate you point it out. I am not sure what you mean by flashing. Do you want a on/off button on the nextion to control and LED on the Arduino? I just want to be clear on your question.
hi can make vdo control 6 relay channel using HMI nextion 7" display with arduino mega.?. thnx in advance and i like your vdo tutorials just learning...
I don't have a 6 channel relay. I will be making a video with a single relay. Maybe that will be enough to help you. I am not sure when I will make but hopefully soon. I will try.
cov bt0.val,va0.txt,1 va0.txt=+"bt0" print va0.txt Error:Invalid Variables:va0txt( Double click to jump to code) Error:Invalid Variables:va0.txt( Double click to jump to code) Error:Invalid Variables:va0.txt( Double click to jump to code) Error:Compile failed! 3 Errors, 0 Warnings, Where did I go wrong?
I am not sure I don't have my dev system with me. I know cov is still usable but you should use covx. I think va0.txt=+ should be vao.txt+= instead and print needs to be in () prints(va0.txt,0) or something like that
@@CheapControls I tried to watch the video many times but still error Video 6:50 cov bt0.val,va0.txt, 1 va0.txt+="bt0" printva0.txt Error:Invalid Variables:cov bt0.val ,va0.txt, 1( Double click to jump to code) Error:Invalid Variables:va0.txt( Double click to jump to code) Error:Invalid Variables:printva0.txt( Double click to jump to code) Error:Compile failed! 3 Errors, 0 Warnings, Do you have HMI File? thank you
@@CheapControls I want to make project switchbutton arduino & Nextion dual state press switchbutton arduino to show state at the Nextion screen. But I can't write code. Nextion Editor ver 1.65.0
These demonstrations of practical applications really are helpful. Thanks.
Thanks for your continued support. I am still looking into those links you posted. I am reworking the main website first and switcing over my Patreon so if I follow your advice I will be ready to go.
Need this code for my project
Always interesting ideas to get inspiration in the Arduino community thanks for sharing.
Glad you enjoyed it!
Greetings! Thankyou for this wonderful tutorial of yours. I have a question, though. I have a project set up like this: a relay controlled by a nextion display containing two pages, the first one is for the logo and the second is for the buttons. For the buttons, I use a dual-state-butons to control the status of the relay so when you click the button, the status of the relay triggers ON and persists until I click the button again. My problem is that when I go back to the first page containing the logo while a button is clicked on the second page, the status of the button in the second page resets while my relay continues to be ON. So it seems the use of dual state buttons is compromised. Do you know what should i do to to fix my problem? Thank you for your insight.
You need change the scope from local to global. You should see this in the attributes of the dual state button. thank you for the kind words and good luck with your project.
Hi.Can I get the sketch Arduino of that video? THANKS!
You have to make file request at www.cheapcontrols.com on the help page
This is such a great tutorial! Im having touble finding the files for download. I found the video in the old website, but there are no links for downoading files, am I looking for them in the wrong place?
That is an older video. I don't have all the files for every video loaded. But I will load them as people request. I just uploaded the files. the should be available now. I could not remember which Arduino file I used in the video. I have two uploaded. I hope one will work for you. If not let me know and I will try to figure out how to help better. thank you for your kind words.
@@CheapControls you are so kind! thanks a lot!!!
Hi. great work with all the videos!
Hope you can help... I am trying really hard to find a video to see 2 dual-state buttons turning on 2 separate LEDs. This is all I will need in my project for now, but I can't find how to do this. I find many videos of how to use a dual-state button to turn on 1 LED, but nowhere about multiple dual-state buttons... Please help....
See if this video helps th-cam.com/video/IsRS8MRLBgQ/w-d-xo.html. If you want a code review consider connecting to me over on www.cheapcontrols.com on the help page.
hi,
I want to trigger Nextion button from arduino, not per hand on the display. do you know, how to trigger dual button from arduino to Nextion display.
See if this video helps th-cam.com/video/zExP3QpUQEo/w-d-xo.html. Thanks for watching
Hi, sorry if I persist with the questions but I can't understand, if I only have a "dual state button" how can I send the two states separately to arduino to make him do a different action for each state?
I have performed many tests but I cannot understand how to do it.
I'm a tough head :-)
Ok, I found the solution, I don't know if it's right or it can be done better but it works, just add these lines in Nextion Editor to send the two different states:
if(bt1.val==1)
{
print "vaporeON"
}else if(bt1.val==0)
{
print "vaporeOFF"
}
That is the way I would do it. Very Good
@@CheapControls As I uderstand, the difference in the case above you can program whatever you want inside the if and that will be done on the nextion side before sending something to the arduino, and in the case on the video the nextion sends a 0 or a 1 when the button is pressed and then you can program whatever you want to do with that on the arduino side, right? Sorry for the many questions, Im just beggining to understand how this works
@@DianaMartinez-su6jh That logic is correct. but I would not just send a 0 or 1. I send it in a key-value pair with a beginning and end parameter. like C:CTST0? starting parameter C:C then the command being TST then the value of 0 then the ending delimiter of ?
How I can get the code from this project ?
You have to submit a comment/question over at www.cheapcontrols.com on the help page.
hi there I copy and paste the code_5 from the text file to Arduino, and verify it show this message (error: 'Serial2' was not declared in this scope) I don't know what I have missed! Can you please help me?
What model of Arduino are you using?
Cheap Controls I’m currently using Arduino uno
My videos use a mega. you will need to add a library and alter the code a bit for the UNO. The mega has extra built in serial ports that the UNO does not have. It is not difficult to use with an UNO. I will post a second reply here with the library. I will also post an different file for the UNO. I am not on my development laptop but will be later.
@@daryl7237 I have the code up at Cheap Controls for download(The links look identical but if you hover over them you will see one will say UNO in the file name). I will work on creating a separate image for UNO versus MEGA. You will notice two new lines at the top of the code. This is for the softserial library. Then in the code Serial2 is replaced with mySerial. You will use pins 2 and 3 for the additional Serial Port.
@@CheapControls woo! that's great thank you so much!
hi, do you have one example only one button, please.
A single button on the arduino sent to Nextion or a single button on Nextion sent to Arduino?
what the code should look like if I would like to control the LEDs with buttons. without flashing, only send data from nextion to Arduino - enable or disable with the button
and by the way, can't download files from the site
I am rebuilding the site. You are the second person to ask about downloading the files. I did not think people were going to the site for the files. I will add a link to the old site on the new one and fix the links in the youtube videos. I appreciate you point it out. I am not sure what you mean by flashing. Do you want a on/off button on the nextion to control and LED on the Arduino? I just want to be clear on your question.
@@CheapControls thank you
yes, I just want dualstatebutton to turn on or off the diode connected to arduino
I have a link to the old site on the new site. You should be able to download the files from the old site.
Try this video and see if it helps. th-cam.com/video/LL4TduSYsZ8/w-d-xo.html
hi can make vdo control 6 relay channel using HMI nextion 7" display with arduino mega.?. thnx in advance and i like your vdo tutorials just learning...
I don't have a 6 channel relay. I will be making a video with a single relay. Maybe that will be enough to help you. I am not sure when I will make but hopefully soon. I will try.
Heelo . You can sending data HMI TJC with arduino mega please. Example led on , off please . Sorry I study English very Bad. Sorry
I am not sure what you mean by TJC?
I noticed you joined the private Facebook group feel free to ask the same question in that group.
cov bt0.val,va0.txt,1
va0.txt=+"bt0"
print va0.txt
Error:Invalid Variables:va0txt( Double click to jump to code)
Error:Invalid Variables:va0.txt( Double click to jump to code)
Error:Invalid Variables:va0.txt( Double click to jump to code)
Error:Compile failed! 3 Errors, 0 Warnings,
Where did I go wrong?
I am not sure I don't have my dev system with me. I know cov is still usable but you should use covx. I think va0.txt=+ should be vao.txt+= instead and print needs to be in () prints(va0.txt,0) or something like that
@@CheapControls I tried to watch the video many times but still error
Video 6:50
cov bt0.val,va0.txt, 1
va0.txt+="bt0"
printva0.txt
Error:Invalid Variables:cov bt0.val ,va0.txt, 1( Double click to jump to code)
Error:Invalid Variables:va0.txt( Double click to jump to code)
Error:Invalid Variables:printva0.txt( Double click to jump to code)
Error:Compile failed! 3 Errors, 0 Warnings,
Do you have HMI File? thank you
You are correct. I just looked up the old file. What version of the Nextion IDE are you using?
@@CheapControls Nextion Editor ver 1.65.0
@@CheapControls
I want to make project switchbutton arduino & Nextion dual state press switchbutton arduino to show
state at the Nextion screen.
But I can't write code.
Nextion Editor ver 1.65.0