I really enjoy your projects. I had to input the code for one of them since you didn't upload it. These are simple to follow and your voice is clear and pleasant. I hadn't touched arduino since doing a drone and this has me hooked again. Thanks so much for what you do for all of us. You're #1
I've been looking for a display to use and came across your tutorials. Wow! It takes a tremendous amount of time to code these things, I know, I've stumbled through many projects and it just takes time. So...THANK YOU! I will be ordering one of these displays and get to work on it. I want to use a laser distance finder to read data, input that to the Arduino and display it onto another 7-segment display, but....I will be using the display as a touch-screen interface to enter calibration data, etc. Your work here just saved me countless hours!!
Thanks for all your videos on these Nextion displays. You were the first to let me know these smart displays existed in one of your older videos. I'm definitely getting one to play with in the near future. One of my displays is very slow (via the I2C bus) because it requires you to read/write 16 bits at a time even if you're updating just one pixel. I couldn't find a library to run it, so I wrote my own library with a 1K write through cache to speed things up (admittedly it was fun to write). But it uses up quite a bit of memory and cpu. It works great now but I can only use it with my Mega2560 due to the memory requirements. These smart Nextion displays reduce the amount of I/O dramatically so it looks like an 8-Mhz arduino can easily use it with plenty of cpu and ram left over to do other things. Oh - and from your recommendations, I purchased some BusBoard breadboards and they seem to be much better quality than my cheaper ones - just as you said. I also just bought a Jameco WBU-208-R Breadboard. I haven't used it yet so we'll see. Thanks again!
Thank you! This help me a lot. Few days ago i order 7 inch nextion and i hope that i be able to learn how to program it until the display arrive to me. :)
Nice. Yeah, is a good idea to start your project right now before getting the display. Especially since you can simulate the display in the debugging feature of the nextion editor. Good luck.
Thank you for sharing your knowledge and skills with us. Will definitely make use of it. What ITEAD concerns. You just have to look at the tutorial video. And the comments.That says it all! Cheers.
Loved this tutorial, not exactly what i need but i'm hoping for one in the future involving Nextion+Arduino+relay board (those low level that come in 4, 8, 16 relays.. my project needs 16 relays )... the second button you created on this tutorial (push) is part of it!
Waow - you made it even better than i was imagine!!! You showed us your misstakes, from which we can learn from and how you work! I learned sooo much from it - i thank you really a lot!!!! Just a question, is there no easier way than the SD-Card way to transfer the data from Nextion to Arduino? I mean we are in 2018 - maybe usb or so? :-)
I am glad it was useful. You mean if there is another way to transfer the tft file from the computer to the display? You can upload the file using a usb-to-serial adapter, but it's slower so I don't like to use it.
you are welcome. I would also if i would be you - informe the developers of nextion that you made a fantastic tutorial and that they can use your link on youtube for it.
A few months ago I posted on the nextion forum complaining about the terrible RTC included on the enhanced versions of the display, and also complain on the lack of tutorials. A couple of ITEAD representatives reply very negatively. I mentioned my tutorials and they deny/dismiss all the problems that the nextion display has. If you want to contact them (ITEAD) and talk about my videos, be my guest. But as far I am concern, they are very rude and ignorant people (at least the guys in charge of the forum). I will not waste more time with them. Conclusion: I think ITEAD don't care about their users. We are on our own. That's why I am here doing what I can to fill the hole/void they left. If you are curious, here's my post: support.iteadstudio.com/support/discussions/topics/11000015385
I'm confused on your gauge, 0 deg is pointed left There is no negative number... How did you get the needle to start below 0 deg and cycle past 0 to the upper threshold? ......Edit, never mind, I just saw it in the IDE. Thanks
I am trying to build a Nextion project to display two separate DC voltages real time as a dynamic bargraph (Progress Bar) and another indicator field that simply shows Red or Green based on a Voltage state (+5V = green, 0V = red) on a third pin. Hopefully I can extract enough hints and tips from this video to assist!
It does send it to the serial monitor too. What I do for troubleshooting is print debugging data in the nextion display, only while troubleshooting. Once the code is finished, i remove that from the display.
Hello, I'm having some kind of an issue, it says that class NexButton has no member named 'getValue' is there any chance the library has been edited or something?
I cannot get this sketch to compile and I have a feeling it is because I dont know what im doing when it comes to trying to use the Nextion.h library. I have it downloaded but where is it supposed to go after that?
Perhaps I missed it but can I have the Arduino command the changing of the display's pages? For example, if the temperature of my sensor goes above a certain value, automatically switch the display to the temperature control page. Thanks
Sir i want to create a gui on nextion display having 7 pages, 1st page contains menu for different items selection, each menu item when pressed open its own page containing values for that item sent from arduino and a back button to go back to main page, please help me in this matter. Each page will run its loop in Arduino code. İ guess I'm able to properly tell my problem. Please help sir in this matter
Nice tutorial. It would be nice if an Arduino could dynamically upload image files as needed, but would be too slow over the serial interface. I think that's a show stopper for a lot of applications.
The only thing between different arduinos that you need to change is the serial name. By default the name is simply "Serial". For the mega i had to change it to "Serial1". How is the Arduino due?
thanks a lot for your tutorial and help,i have just a question about sending data from nextion to arduino ,for example how can i send txt.val of t0 to display it on monitor serial of arduino IDE,i hope you will answer me ,thanks and best regards.
Thank you for your tutorials, I learn al lot from it... only part that won't work is to change teh baudrate of te screeb?... what I try it stays on 9600???
Hi InterlinkKnight, first of all thank you for your outstanding work! I tried to find a way to get me into the NEXTION display generation. Tried several ways, read a lot in other forums, but noboby was able to open the lock. Since I found your videos here on RUclips. I worked them all through, all of them worked so far, now a tiny problem occured: In Your tutorial #6 you want to get rid of the flickering of the gauge and at minute 15:00 you make an input in the timer you used for the changing of colors: - - - if(z0.val!=va0.val) { z0.val=va0.val } - - - If i do the same and debug, I get the followig errors: - - - Error:Invalid Variables:va0.val( Double click to jump to code) Error:Invalid Variables:va0.val( Double click to jump to code) Error:Compile failed! 2 Errors, 0 Warnings, - - - Well I can live with the flickering, but it would be nice to solve, just to solve and learn ... Any idea? Thank you in advance Freddie
Not sure what you did different. Compare your code to mine as close as possible. Eventually you should find the difference. I wish i could help you but nothing comes to my mind. At least you have my code working so you can use it as a template.
I have a question. ... On Page 2 when we turn on LED with the image on... without click to turn off, just touch back to Page 1 .. How to keep Page 2 button still on when you touch back to page 2? Cause when you go back. it seem like refresh the Page and the button back to default on OFF ... Could you keep it ON when go back and forward between the Pages? THANKS
@@interlinkknight ...Thank so much for the tutorials. You're great. I'm newbie :) ... Could you show me how to do that ? " in the tributes, put global .." Thanksssssss
Hello, I have some problems with measuring the voltage with the screen and arduino. I can read the correct value with the Serial Monitor of the Arduino IDE, but the screen does not show the value. Could you help me with my code? Can I send it to you? Thanks!
mine is not working... not getting the callback funtions on the arduino to start.. i can read the callback data i get the data from the display but b1.attachPush(b1PushCallback); not working
I can not get past "GaugeValue does not name a type". Updating just the number on the Nextion works fine, but not the gauge. I have double checked the code, I should have the library installed, but no help. Any ideas??
Watch the troubleshooting video. And also, try my examples of my other videos. To send data you shouldn't be using the library, anyway. That's your mistake, apparently.
Hello! Friend First of all many thanks to share such a fantastic information about this display, though I do not use Arduino still the tutorial was so helpful to understand things related to the display pretty well.I use only PIC microcontroller and Flowcode as the programming software, so find it little difficult to figure out how to start (do not know "C" language) but I am sure your tutorial will surely help me to progress.May I know if you have prepared any tutorial on the Nextion and PIC microcontroller, I will be happy to see that too. Thank you again. Abhi
You make it appear easy to use that Nextion editor. It's not intuitive. However, this is the only way to add attractive display/control to a microcontroller without a team and huge budget.
I agree that the editor is not very intuitive, but trust me that after a little practice its not that hard. Everything always look hard at first, but later you see how easy things really are.
Oh yes, I can learn anything, but after few decades of software use and design work, one realizes that intuitive software only needs to be learned once, and not every time there's a six-month gap between uses. Have you ever had to re-learn Microsoft Word, or Ubuntu's file browser, just because you didn't use them for a few months? Nextion Editor is one of those that has to be re-learned every time a product update requires a rare UI change. Nextion Editor is like The Gimp image editing software (not that Photoshop is much better). Aurgh!
Hi Thank you for posting up a solid how-to for the nextion display. Been messing about with editor doing a project still havent. Received the display or teensy yet but its the arduino code part i didnt get now its making sense. Question1: on the gauge i still dont fully understand how you get the gauge to read counter-clockwise from the stock 0 position 9oclock. Is that why your code have -360? Your gauge dial starts at 7oclock How do you set the dial? Coz when you add a gauge dial it auto points at 9oclock/ points left side. Question2: is there a way to show a picture as an alert if a specific value is reached, similar to the way you change txt color? Everything else i think i got. Thanks
Thanks for your words. To answer your 1st question, the gauge by default points 9 o'clock that is the 0 value. The value of the gauge is in degrees and starts in the 9 o'clock (0 degrees). As you saw on the video, a value of 90° would be pointing 12 o'clock, for example. A value of 180 would be like 3 o'clock, etc. The -360 in the sketch is a way I use to continue from 359. For example, I can't send a value of 361. Instead of sending 361, I subtract 360 to the 361 to get a valid value of 1. You can hide any object, including images, using the "vis" command like this: Serial.print("vis j0,0"); Serial.write(0xff); Serial.write(0xff); Serial.write(0xff); vis is the command to hide or show an object; j0 is the name of the object; the number 0 after the comma is to hide the object. Instead of the 0 you can put a number 1 to show (reappear) the object. You can see that on my 1st video tutorial. I hope this helps.
InterlinkKnight Thank you for quick reply! you explain that so well . will check out the vids .after watch your tutorials man the nextion programming is waay easy then it seems. Thank you.
InterlinkKnight question on buttons: my project has page0-page8 and 3buttons per page (Home,Next & Back) for each button in project i have just the " Touch Release Event" set to "page Home, page Next, page Back" for each button. When debug it works i can switch between page0-8. Do i still need to setup "touch/ release event " and nextion library in the arduino code aswell for it to work once uploaded to nextion display? or the Touch /release events only needes in arduino code if am goin to use a button like a On/off to controll a led attach to arduino?
Buttons that are to only change pages doesn't need any check event boxes nor any code on the sketch. You don't even need the nextion library on arduino for that. Changing pages is an internal thing inside the display so leave arduino out of it. If you pay attention to my video, my NEXT and BACK buttons don't have any checkbox event enabled. Also, those buttons are not in my sketch anywhere.
There are many ways you can handle that. Usually, the LED would stay ON and the toggle switch on the display would reset to the default value once you go to another page, but you can make it a global variable so it can remember the state, no matter in what page it is.
Can anyone help me please. I want to change the colour of a number if it is in a range of numbers. How do i use an "or" in the if statment? I have tried the normal || but i get a compile error. I just want the colour to change if x value is above x but bellow x
Check my other tutorials. Inside their examples there are if statements in the nextion editor. Especially check the one about the nextion RTC. That one has a lot of if statements
Oh, you mean HDMI generic monitor or TV? No, no, no. That's a completely different thing. This video is about nextion displays that allow creating a graphic interface and connect to microcontrollers like Arduino. Nextion displays have their own controller so Arduino doesn't have to write everything on the screen. Instead, in the nextion editor you create the images, text, buttons, etc and then communicate with Arduino about the actions and send values and things like that. There are many sizes for the nextion display, but you can't use any generic display for that. If you want a generic display, maybe use a raspberry pi
@@interlinkknight yep, gotcha. That makes perfect sense! So, what else would I have to do to with the Arduino the receive the CAN signals from my ecu? My ecu has a CAN high and CAN low out put.
Hello Nextion + Arduino King. Your videos have got me extremely far. I've created a keyboard on the Nextion. I am trying to store the text from the textbox into a string in the arduino. I am using the getText method with a char buffer[100]. Is there a way to convert this buffer to a string? Any help would be greatly appreciated!
Thanks for your kind words. In one of my tutorials i have an example that takes text from the display and sends it to Arduino. It's not already a string?
Hi InterlinkKinght ! I am using a Arduino UNO and a 4.3 Nextion display. I compiled the code and it is all OK. I made step by step the whole tutorial. The progress bar is updating the value. The gauge is also working. The problem is that the LED and the built-in LED does not go to ON state. It is always OFF. I checked the display TX/RX connections and they are OK. I tried another UNO board. But the problem is the same. I tried a different 2.4 Nextion display and the problem is the same. When I debug using the Nextion Editor both LEDs goes ON and OFF. Do you have an idea what it should be happening ? Thanks in advance.
InterlinkKnight I used the same code you wrote, the same variables and display design (HMI). Everything is the same. No adaptation. I basically copied, paste and study your code. I did this way to guarantee that it should work, because I have tried many others tutorial and the problem was the same.
Maybe you didn't use the correct nextion library. Maybe you forgot to put the correct id number of the button in the sketch. I don't know. I would have to check the code to tell.
Hi @@interlinkknight! I found the mistake. My Nextion display was connected to a 5VDC adapter and the Arduino UNO was connected to the USB 5VDC of my PC. I solved the problem by connecting a "common Ground" between then. Now the code and hardware are running nicelly. Thanks a lot.
Hello guys, I keep getting an error saying "Invalid command n0.val = h0.val( Double click to jump to code)" even though I am simply changing a number value every 50ms with a timer, according to a slider's value(h0). This happens with other components too, and I can't understand why... Any ideas?
I'm glad I could help. Next time try to use the examples (mine or from wherever) instead of writing your own code. That way you can avoid this kind of mistakes. At least that's what I do. Good luck :)
That kind of project is very specific. There are already many examples and tutorials about monitoring that kind of thing. You just have to adapt it to show the information in the nextion display.
Trying to get Nextion Editor 0.59 to install on Windows 10 but I keep getting an error window that says "WriteEXEini Error! Load RunMan Star". Anyone know what could be causing this? Did a search for the error but no information.
Well, I only seen that error when using different libraries so it has to be something like that. Check again if you have multiple nextion libraries in your computer. I've see people making that mistake of installing the nextion library from the arduino IDE "library manager" and later adding another nextion library in their library folder. It causes a mess. All this assuming you are trying to use any of my examples.
@@interlinkknight a customer of mine wants to have a voltage measurement to be updated around every 300ms. So that is doable right? What would be the limiting factor? The arduino, the screen, the code..?
Ok tutorial but screen is too blurry. I can't even read anything in full screen. You are VERY smart and I wish you could write a book for Nextion. I would buy it : )
Seems to me that you're spending most of your time and effort developing work-arounds to compensate for the poor design and bad behavior of the Nextion development system. I hope their development system is open source. I'd love to refactor the whole thing to take care of all the problems you encountered. Also, your variable names should be descriptive of their use. Never use names like "variable", for example. That said, I appreciate your efforts and your examples serve as a warning as to what to watch out for when programming these Nextion displays.
@@interlinkknight Yes, I agree that you were descriptive and clear. I am not critical of you but of the tools that the vendor offers. Now, thanks to you, I will know what to expect when I develop my own applications. Thank you!
@@interlinkknight You maybe didn't SKIP but again, you speed the video up in some parts. People learn better ONE thing at a time. Right no, all I want to to is write a variable number from arduino into a box on the screen.
Im getting a compilation error 1; exit status 1. cant find SPI.h file or directory. alternative resolvelibrary(spi.h) . im looking for an SPI library but no luck so far lol
@@interlinkknight Yea Im going to try uninstalling and reinstalling arduino IDE tomorrow. Might have deleted a bunch of the wrong libraries lol. all my sketches have that problem woops
The BEST Nextion display tutorial on RUclips!!!!! Thank YOU Sir!
Thanks
I really enjoy your projects. I had to input the code for one of them since you didn't upload it. These are simple to follow and your voice is clear and pleasant. I hadn't touched arduino since doing a drone and this has me hooked again. Thanks so much for what you do for all of us. You're #1
Thank you. This video removed a lot of mystery regarding using Nextion displays as a bidirectional interface.
I've been looking for a display to use and came across your tutorials. Wow! It takes a tremendous amount of time to code these things, I know, I've stumbled through many projects and it just takes time. So...THANK YOU! I will be ordering one of these displays and get to work on it. I want to use a laser distance finder to read data, input that to the Arduino and display it onto another 7-segment display, but....I will be using the display as a touch-screen interface to enter calibration data, etc. Your work here just saved me countless hours!!
Great. It's nice to see that I helped. Good luck with your project. If you make a video about your project, post the link in here.
Thanks for all your videos on these Nextion displays. You were the first to let me know these smart displays existed in one of your older videos. I'm definitely getting one to play with in the near future.
One of my displays is very slow (via the I2C bus) because it requires you to read/write 16 bits at a time even if you're updating just one pixel. I couldn't find a library to run it, so I wrote my own library with a 1K write through cache to speed things up (admittedly it was fun to write). But it uses up quite a bit of memory and cpu. It works great now but I can only use it with my Mega2560 due to the memory requirements.
These smart Nextion displays reduce the amount of I/O dramatically so it looks like an 8-Mhz arduino can easily use it with plenty of cpu and ram left over to do other things.
Oh - and from your recommendations, I purchased some BusBoard breadboards and they seem to be much better quality than my cheaper ones - just as you said. I also just bought a Jameco WBU-208-R Breadboard. I haven't used it yet so we'll see. Thanks again!
It's nice to know that I helped you. Thanks for the comment. If you have a problem, let me know.
29 mins i even not forwarded the video..tooo interesting..thanks for sharing brother...
:)
Thank you! This help me a lot. Few days ago i order 7 inch nextion and i hope that i be able to learn how to program it until the display arrive to me. :)
Nice. Yeah, is a good idea to start your project right now before getting the display. Especially since you can simulate the display in the debugging feature of the nextion editor. Good luck.
Thank you very much, the information you provide here is very useful.
Thank you for sharing your knowledge and skills with us. Will definitely make use of it. What ITEAD concerns. You just have to look at the tutorial video. And the comments.That says it all! Cheers.
Thank you so much, this video was really helpful!
Excellent work! Seriously...
Great job, thank you for your time and your great video !
Loved this tutorial, not exactly what i need but i'm hoping for one in the future involving Nextion+Arduino+relay board (those low level that come in 4, 8, 16 relays.. my project needs 16 relays )... the second button you created on this tutorial (push) is part of it!
Waow - you made it even better than i was imagine!!!
You showed us your misstakes, from which we can learn from and how you work!
I learned sooo much from it - i thank you really a lot!!!!
Just a question, is there no easier way than the SD-Card way to transfer the data from Nextion to Arduino? I mean we are in 2018 - maybe usb or so?
:-)
I am glad it was useful.
You mean if there is another way to transfer the tft file from the computer to the display? You can upload the file using a usb-to-serial adapter, but it's slower so I don't like to use it.
Yes this was the question. Strange that this is slower :-)
Thanks for the tip. I will do it.
you are welcome. I would also if i would be you - informe the developers of nextion that you made a fantastic tutorial and that they can use your link on youtube for it.
A few months ago I posted on the nextion forum complaining about the terrible RTC included on the enhanced versions of the display, and also complain on the lack of tutorials. A couple of ITEAD representatives reply very negatively. I mentioned my tutorials and they deny/dismiss all the problems that the nextion display has.
If you want to contact them (ITEAD) and talk about my videos, be my guest. But as far I am concern, they are very rude and ignorant people (at least the guys in charge of the forum). I will not waste more time with them.
Conclusion: I think ITEAD don't care about their users. We are on our own. That's why I am here doing what I can to fill the hole/void they left.
If you are curious, here's my post: support.iteadstudio.com/support/discussions/topics/11000015385
This was very helpful thanks alot!
I'm confused on your gauge, 0 deg is pointed left There is no negative number... How did you get the needle to start below 0 deg and cycle past 0 to the upper threshold? ......Edit, never mind, I just saw it in the IDE. Thanks
I am trying to build a Nextion project to display two separate DC voltages real time as a dynamic bargraph (Progress Bar) and another indicator field that simply shows Red or Green based on a Voltage state (+5V = green, 0V = red) on a third pin. Hopefully I can extract enough hints and tips from this video to assist!
Yes, it's possible. Just watch all my tutorials and try those examples
THANK YOU, EXACTLY THAT I WAS LOOKING FOR ;-)
Thanks man this helped me a lot
When you are sending and receiving data, does it get sent to the serial monitor? If so, how do you use the serial monitor for troubleshooting?
It does send it to the serial monitor too. What I do for troubleshooting is print debugging data in the nextion display, only while troubleshooting. Once the code is finished, i remove that from the display.
@interlinkknight Good idea thanks
Hello, I'm having some kind of an issue, it says that class NexButton has no member named 'getValue'
is there any chance the library has been edited or something?
You are using the wrong library
Best explanation ever!!
Nice video, well done ,thanks :)
I cannot get this sketch to compile and I have a feeling it is because I dont know what im doing when it comes to trying to use the Nextion.h library. I have it downloaded but where is it supposed to go after that?
Watch my troubleshooting video for nextion display
Awesome video. Learnt a lot.
Has anyone been able to send a float value to the display? If so how. I am only able to send integers.
Hi friend
Do you have tutorial for read or write data from modbus device..
then connect dan display in nextion
Thanks
Hi,
Sorry but I have no idea
Perhaps I missed it but can I have the Arduino command the changing of the display's pages? For example, if the temperature of my sensor goes above a certain value, automatically switch the display to the temperature control page. Thanks
Yes, you can. I show that on tutorial #1, I think
Salut est-il possible de dupliqué l'affichage de l'écran nextion, sur un écran tv via un module arduino VGA ?
Not possible
Sir i want to create a gui on nextion display having 7 pages, 1st page contains menu for different items selection, each menu item when pressed open its own page containing values for that item sent from arduino and a back button to go back to main page, please help me in this matter. Each page will run its loop in Arduino code. İ guess I'm able to properly tell my problem. Please help sir in this matter
I'm sorry but I can't work on anybody's project. Following this video tutorial you can do all that.
Nice tutorial. It would be nice if an Arduino could dynamically upload image files as needed, but would be too slow over the serial interface. I think that's a show stopper for a lot of applications.
nay I have to edit something on Nextion Libreary to use with Arduino due ?
The only thing between different arduinos that you need to change is the serial name. By default the name is simply "Serial". For the mega i had to change it to "Serial1". How is the Arduino due?
thanks a lot for your tutorial and help,i have just a question about sending data from nextion to arduino ,for example how can i send txt.val of t0 to display it on monitor serial of arduino IDE,i hope you will answer me ,thanks and best regards.
I show that on my 2nd tutorial
Thank you for your tutorials, I learn al lot from it... only part that won't work is to change teh baudrate of te screeb?... what I try it stays on 9600???
Watch my troubleshooting video. I talk about that there.
I go look.... also still not get my waveform working.... maybe also something for a turtorial
I show the waveform in part 2
Hi InterlinkKnight,
first of all thank you for your outstanding work!
I tried to find a way to get me into the NEXTION display generation. Tried several ways, read a lot in other forums, but noboby was able to open the lock. Since I found your videos here on RUclips.
I worked them all through, all of them worked so far, now a tiny problem occured:
In Your tutorial #6 you want to get rid of the flickering of the gauge and at minute 15:00 you make an input in the timer you used for the changing of colors:
- - -
if(z0.val!=va0.val)
{
z0.val=va0.val
}
- - -
If i do the same and debug, I get the followig errors:
- - -
Error:Invalid Variables:va0.val( Double click to jump to code)
Error:Invalid Variables:va0.val( Double click to jump to code)
Error:Compile failed! 2 Errors, 0 Warnings,
- - -
Well I can live with the flickering, but it would be nice to solve, just to solve and learn ...
Any idea?
Thank you in advance
Freddie
Not sure what you did different. Compare your code to mine as close as possible. Eventually you should find the difference.
I wish i could help you but nothing comes to my mind. At least you have my code working so you can use it as a template.
I have a question. ... On Page 2 when we turn on LED with the image on... without click to turn off, just touch back to Page 1 .. How to keep Page 2 button still on when you touch back to page 2? Cause when you go back. it seem like refresh the Page and the button back to default on OFF ... Could you keep it ON when go back and forward between the Pages?
THANKS
In the tributes, put global
@@interlinkknight ...Thank so much for the tutorials. You're great.
I'm newbie :) ... Could you show me how to do that ? " in the tributes, put global .." Thanksssssss
@@interlinkknight
Thank so much, I think I got it now.
Hello, I have some problems with measuring the voltage with the screen and arduino. I can read the correct value with the Serial Monitor of the Arduino IDE, but the screen does not show the value. Could you help me with my code? Can I send it to you? Thanks!
never mind, I got it working! I forgot to change the serial line in the library :)
mine is not working... not getting the callback funtions on the arduino to start.. i can read the callback data i get the data from the display but b1.attachPush(b1PushCallback); not working
Try my example files first
Nice tuto.
How can i detect long pressed of a button instead of one touch at a time?
Thanks.
Marc.
There's no native way to do that, but I am thinking that you can do it by using timers and variables. You need to know how to write code, though.
I can not get past "GaugeValue does not name a type". Updating just the number on the Nextion works fine, but not the gauge. I have double checked the code, I should have the library installed, but no help. Any ideas??
Watch the troubleshooting video. And also, try my examples of my other videos. To send data you shouldn't be using the library, anyway. That's your mistake, apparently.
Hello! Friend
First of all many thanks to share such a fantastic information about this display, though I do not use Arduino still the tutorial was so helpful to understand things related to the display pretty well.I use only PIC microcontroller and Flowcode as the programming software, so find it little difficult to figure out how to start (do not know "C" language) but I am sure your tutorial will surely help me to progress.May I know if you have prepared any tutorial on the Nextion and PIC microcontroller, I will be happy to see that too.
Thank you again.
Abhi
I never used PIC so I don't plan doing any tutorial about it.
@@interlinkknight
Hello! Friend
Humbly thanks for the reply and your tutorial too, I shall try to learn and implement from the existing one.
Abhi
Obrigado, aqui deu tudo certo. Thank you.
You make it appear easy to use that Nextion editor. It's not intuitive. However, this is the only way to add attractive display/control to a microcontroller without a team and huge budget.
I agree that the editor is not very intuitive, but trust me that after a little practice its not that hard. Everything always look hard at first, but later you see how easy things really are.
Oh yes, I can learn anything, but after few decades of software use and design work, one realizes that intuitive software only needs to be learned once, and not every time there's a six-month gap between uses. Have you ever had to re-learn Microsoft Word, or Ubuntu's file browser, just because you didn't use them for a few months? Nextion Editor is one of those that has to be re-learned every time a product update requires a rare UI change. Nextion Editor is like The Gimp image editing software (not that Photoshop is much better). Aurgh!
Hi Thank you for posting up a solid how-to for the nextion display. Been messing about with editor doing a project still havent. Received the display or teensy yet but its the arduino code part i didnt get now its making sense.
Question1: on the gauge i still dont fully understand how you get the gauge to read counter-clockwise from the stock 0 position 9oclock. Is that why your code have -360? Your gauge dial starts at 7oclock How do you set the dial? Coz when you add a gauge dial it auto points at 9oclock/ points left side.
Question2: is there a way to show a picture as an alert if a specific value is reached, similar to the way you change txt color?
Everything else i think i got.
Thanks
Thanks for your words.
To answer your 1st question, the gauge by default points 9 o'clock that is the 0 value. The value of the gauge is in degrees and starts in the 9 o'clock (0 degrees). As you saw on the video, a value of 90° would be pointing 12 o'clock, for example. A value of 180 would be like 3 o'clock, etc. The -360 in the sketch is a way I use to continue from 359. For example, I can't send a value of 361. Instead of sending 361, I subtract 360 to the 361 to get a valid value of 1.
You can hide any object, including images, using the "vis" command like this:
Serial.print("vis j0,0");
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
vis is the command to hide or show an object; j0 is the name of the object; the number 0 after the comma is to hide the object. Instead of the 0 you can put a number 1 to show (reappear) the object. You can see that on my 1st video tutorial.
I hope this helps.
InterlinkKnight Thank you for quick reply! you explain that so well . will check out the vids .after watch your tutorials man the nextion programming is waay easy then it seems.
Thank you.
Yeah, programing the nextion display is easier than most people think.
InterlinkKnight
question on buttons: my project has page0-page8 and 3buttons per page (Home,Next & Back) for each button in project i have just the
" Touch Release Event" set to "page Home, page Next, page Back" for each button. When debug it works i can switch between page0-8. Do i still need to setup
"touch/ release event " and nextion library in the arduino code aswell for it to work once uploaded to nextion display? or the Touch /release events only needes in arduino code if am goin to use a button like a On/off to controll a led attach to arduino?
Buttons that are to only change pages doesn't need any check event boxes nor any code on the sketch. You don't even need the nextion library on arduino for that. Changing pages is an internal thing inside the display so leave arduino out of it.
If you pay attention to my video, my NEXT and BACK buttons don't have any checkbox event enabled. Also, those buttons are not in my sketch anywhere.
Yes you did it - i thank you sooo much :-)!!!!!
fantastic work! Thanks
what happend if you turn on led and go to another page?
There are many ways you can handle that. Usually, the LED would stay ON and the toggle switch on the display would reset to the default value once you go to another page, but you can make it a global variable so it can remember the state, no matter in what page it is.
Can anyone help me please. I want to change the colour of a number if it is in a range of numbers. How do i use an "or" in the if statment? I have tried the normal || but i get a compile error. I just want the colour to change if x value is above x but bellow x
Check my other tutorials. Inside their examples there are if statements in the nextion editor. Especially check the one about the nextion RTC. That one has a lot of if statements
The word byte of my project wont turn blue..
Hey guys, what is the best way to read floats using the nextion display? I only see decimal, hex or currency.
Use normal numbers and put a dot on the background of the display.
GOOOOOOOOOOOOOOOOOOOOOOOOOOOD WORK
muchas gracias por tu aporte
De nada 👍
thank you a lot my friend
Does anyone know if this project will work with the 7 inch HDMI screens that can be purchased off Amazon?
All nextion displays work the same no matter the size
@@interlinkknight right ok, but does it matter if they aren't nextion displays? Or are the 7 inch displays really generic
Oh, you mean HDMI generic monitor or TV? No, no, no. That's a completely different thing. This video is about nextion displays that allow creating a graphic interface and connect to microcontrollers like Arduino. Nextion displays have their own controller so Arduino doesn't have to write everything on the screen. Instead, in the nextion editor you create the images, text, buttons, etc and then communicate with Arduino about the actions and send values and things like that.
There are many sizes for the nextion display, but you can't use any generic display for that. If you want a generic display, maybe use a raspberry pi
@@interlinkknight yep, gotcha. That makes perfect sense!
So, what else would I have to do to with the Arduino the receive the CAN signals from my ecu? My ecu has a CAN high and CAN low out put.
I don't really know, but I guess if you you look for that maybe someone has a tutorial or something about that.
I’m wondering what size Micro sd card I should get. What’s the average size of the files?
The memory limit is on the specs of each display. Maximum that I've seen is 32MB
Hello Nextion + Arduino King. Your videos have got me extremely far. I've created a keyboard on the Nextion. I am trying to store the text from the textbox into a string in the arduino. I am using the getText method with a char buffer[100]. Is there a way to convert this buffer to a string? Any help would be greatly appreciated!
Thanks for your kind words.
In one of my tutorials i have an example that takes text from the display and sends it to Arduino. It's not already a string?
@@interlinkknight I have no idea why it wasn't working. Booted it up and it works great now... Thanks!!!!
I'm glad :)
Hi InterlinkKinght ! I am using a Arduino UNO and a 4.3 Nextion display. I compiled the code and it is all OK. I made step by step the whole tutorial. The progress bar is updating the value. The gauge is also working. The problem is that the LED and the built-in LED does not go to ON state. It is always OFF. I checked the display TX/RX connections and they are OK. I tried another UNO board. But the problem is the same. I tried a different 2.4 Nextion display and the problem is the same. When I debug using the Nextion Editor both LEDs goes ON and OFF. Do you have an idea what it should be happening ? Thanks in advance.
I would have to see the code to tell.
InterlinkKnight I used the same code you wrote, the same variables and display design (HMI). Everything is the same. No adaptation. I basically copied, paste and study your code. I did this way to guarantee that it should work, because I have tried many others tutorial and the problem was the same.
Maybe you didn't use the correct nextion library. Maybe you forgot to put the correct id number of the button in the sketch. I don't know. I would have to check the code to tell.
Hi @@interlinkknight! I found the mistake. My Nextion display was connected to a 5VDC adapter and the Arduino UNO was connected to the USB 5VDC of my PC. I solved the problem by connecting a "common Ground" between then. Now the code and hardware are running nicelly. Thanks a lot.
Nice to hear you solved the problem
Hello guys, I keep getting an error saying "Invalid command n0.val = h0.val( Double click to jump to code)" even though I am simply changing a number value every 50ms with a timer, according to a slider's value(h0). This happens with other components too, and I can't understand why... Any ideas?
To me, it looks like you are putting spaces between the = sign
@@interlinkknight My god, that was it! Thanks a lot, also for the tutorial
I'm glad I could help. Next time try to use the examples (mine or from wherever) instead of writing your own code. That way you can avoid this kind of mistakes. At least that's what I do. Good luck :)
a library to use with Arduino Zero and Nextion , Can u help me ?
thanks,, i started from zero.
please make it more tutorial nextion..
how about monitoring air quality using sensor please....
That kind of project is very specific. There are already many examples and tutorials about monitoring that kind of thing. You just have to adapt it to show the information in the nextion display.
Many thanks!
superb. Thanks allot!
I have a question: How do I get the display to show for example 3.1 instead of 3?
It doesn't support decimals so multiply by 10, then send to the display and add the dot in the background image if that screen
@@interlinkknight when I multiply by ten I get 10,20,30 etc. I have defined the values as int. Do I need to define them otherwise?
I mean, instead of having float to have decimals, use larger numbers. Instead of 1.2 use 12
@@interlinkknight that is what I did, I multiplied my integer value by 10, but then I still get 10,20,30 etc.
@@interlinkknight i have fixed it! :) what I was: change inputvalue * (5.0/1023.0) to inputvalue * (5.0/102.3). Now it shows 12, 21, 33 etc.
Trying to get Nextion Editor 0.59 to install on Windows 10 but I keep getting an error window that says "WriteEXEini Error! Load RunMan Star". Anyone know what could be causing this? Did a search for the error but no information.
I don't know, to be honest
@@interlinkknight Do you know of an alternative GUI editor that I could use? Possibly for Mac OS?
No
Uploading after editing does not work properly please help sir
I don't know. Try my examples first and see if they work
@@interlinkknight I have seen it, but I cannot work it
You please learning me arduino programming
watch my troubleshooting video
Hi yung nextion ko po ay nag black ang screen mafifix pa po ba yun?
''NextButton'' does not name a type . anyone help please!
You are using the wrong library.
i used the library from your description and arduino ide is 1.8.5
Well, I only seen that error when using different libraries so it has to be something like that. Check again if you have multiple nextion libraries in your computer. I've see people making that mistake of installing the nextion library from the arduino IDE "library manager" and later adding another nextion library in their library folder. It causes a mess.
All this assuming you are trying to use any of my examples.
Чудовий урок. Лайк!
i guess your error (modify number page)
good work
What is the refresh rate?
Depends, but its around 10 fps for the enhance version
@@interlinkknight a customer of mine wants to have a voltage measurement to be updated around every 300ms. So that is doable right? What would be the limiting factor? The arduino, the screen, the code..?
Yeah, is possible. The limiting factor is the Arduino loop. Use the fastest serial baud rate supported on the display
@@interlinkknight alright, thanks! How could I determine how much time the loop takes?
Do you really need to measure the loop time? Just avoid delays on the loop and should be very fast by itself.
good video
The library seems to be busted, or maybe outdated at this point in time. It doesn't compile anymore.
Did you download it from the link I provided on the description?
@@interlinkknight ah, i see what was wrong. sorry, i missed an instruction for setting up an arduino uno.
Please helping sir Arduino programming . God+ you sir
Good your video.
Am fast time you please help sir
Ok tutorial but screen is too blurry. I can't even read anything in full screen. You are VERY smart and I wish you could write a book for Nextion. I would buy it : )
Seems to me that you're spending most of your time and effort developing work-arounds to compensate for the poor design and bad behavior of the Nextion development system. I hope their development system is open source. I'd love to refactor the whole thing to take care of all the problems you encountered.
Also, your variable names should be descriptive of their use. Never use names like "variable", for example.
That said, I appreciate your efforts and your examples serve as a warning as to what to watch out for when programming these Nextion displays.
My examples are tutorials by itself so I want to be very descriptive and clear.
@@interlinkknight Yes, I agree that you were descriptive and clear. I am not critical of you but of the tools that the vendor offers.
Now, thanks to you, I will know what to expect when I develop my own applications. Thank you!
if u want ur video to be helpful you need to slow down.
You can pause as much as you want, you know. There's no need to slow down unnecessarily.
Sorry, but your project is not compiling
What do you mean? In Arduino? Make sure you use the library posted on the description
@@interlinkknight I used your library, but it still says something with Serial2 is recommended
I recommend you watch my troubleshooting video
You still speed up crucial steps! Break this down into smaller steps and DON'T speed up anything.
Can you give me an example of a step that I skipped?
@@interlinkknight You maybe didn't SKIP but again, you speed the video up in some parts. People learn better ONE thing at a time. Right no, all I want to to is write a variable number from arduino into a box on the screen.
Im getting a compilation error 1; exit status 1. cant find SPI.h file or directory. alternative resolvelibrary(spi.h) . im looking for an SPI library but no luck so far lol
I don't use any SPI on this examples. There's some kind of mistake
@@interlinkknight Yea Im going to try uninstalling and reinstalling arduino IDE tomorrow. Might have deleted a bunch of the wrong libraries lol. all my sketches have that problem woops
@@interlinkknight if anyone has the same issue as me reinstall Arduino AVR Boards or update it. that was my problem unrelated to your videos.
Excellent video. Thanks!