This video got me started with the Nextion Display. It also inspired me to create about 30 videos on youtube to help others. Thanks a ton for your inspiration.
I like that you supply working example code and not only explain it well in the video, but the code is commented really good. I'm no programmer, so this makes it much easier for me. Thank you very much!
Just want to say thanks so much for teaching me so much about how to do this. I have fully learned how to programme an amazing looking touch GUI in the space of 12 hours. I couldn't do this yesterday .. Keep doing these amazing video posts !
I'm so happy to know I could help. I'm not making more videos about the nextion display because i think i covered the most relevant stuff. Unless you think i missed something?
Fantastic !!!. I have had a Nextion display for a while and have not been able to understand how to connect it with an Arduino this video is fantastic, great work and very well explained, music or no music great !!!!!!!! Keep up the good work for newb's like me
Muito bom!! Fiz muitos testes para entender como funciona o display usando apenas um Arduino nano e o IDE da Nextion que simula o display no notebook. Treinei 100% dos comandos que precisei usar na minha aplicação com o PIC usando o Arduino Nano e depois fiz as bibliotecas em C para PIC compilador CCS e funcionou tudo.. Parabéns pelo Tutorial.
Thanks for the tutorial.. You guys can use this following code to reduce total line. in loop section; sendNoticeToNextion("t4.txt","Hello from arduino.."); after the loop section; void sendNoticeToNextion(String file,String text) // string file must be the object name from nextion display. { String command = String(file)+"=\""+String(text)+"\""; Serial.print(command); endCommand(); } void endCommand() // we called this part of code from other void { Serial.write(0xff); Serial.write(0xff); Serial.write(0xff); }
Don't you think that strategy makes it more complicated and confusing? Everybody is free to write the code as they want, but to be honest I think is better keep all contain and clear putting the last 3 "Serial.write(0xff);" commands together everytime we send data to the display. At least your approach uses less memory?
i guess.. i am working on a project that uses a lot of sensors.so arduino side of the project is really messy right now that's why i have to simplify it as much as i can..
There is a company address on the Nextion's website,It's really shenzhen.But we're not going to call it Nextbalbala,and it's very cheap in China.umm,but the packaging is not well.like your display,just need cost 98RMB(14.7$)in the TAOBAO.
I am glad it was helpful for you. I have a lot done for the 2nd and 3rd video, but hurricane Irma just pass on florida a few days ago, and that slow me down. I live in Miami and I travel to the north to pass the hurricane in a safer area. Luckily for me, my home its fine and I can comeback soon to resume normal life and my youtube videos. These videos are taking more time than normal for that reason, but trust me their coming. I even bought a new decent microphone so my voice its going to sound more clearly. Anyway, thanks for the support and stay tuned for the next videos. Cheers.
Brother, thank you for all the efforts you're putting in these videos they are very informative and well explained, i really appreciate it especially for students (19yo Btw)👌
I have no “User MCU” option on the debug screen. And anything I send to the nextion is not received. I feel as if I’m missing something important. Any thoughts?
Thanks for sharing ! I discover both your channel, and the nextion display. Subscribed and wondering where I have been, since it looks like this display has been covered numerous time on channel I already follow. Thanks again !
The display has been available for only a few years so it's understandable that you didn't knew about it. Thanks for your support and remember that if you need help, you can count on me.
Hi, I tried to follow your video but something doesn't work, it seems as if the nextion can't read the serial. My datas are not updating, any advice on how to resolve this?
I did accomplish to send data from the display to arduino and it works pretty good. Right now I am working on the video tutorial for that. Should be ready for youtube in around 1-2 weeks. I am not the kind of guy that say "subscribe" but you really should if you want to know when the video is on my channel.
Hi in Timer Event i wrote this code if (n0.val > 99) { n0.pco = 63488 } else { n0.pco = 0 } if ( z0.val! = va0.val) { z0.val = va0.val } But after compiling it says Error: :if (n0.val > 99)( Double click to jump to code) Error: SYNTAX ERROR: Extra "{":{( Double click to jump to code) May you tell me what can be the problem? Thank you.
Do you know if this display will work over long distances like 3 meters? I am trying to do a project where arduino sits in the back of a car and the screen on the dashboard. Tried with TFT display and the output was broken with no display after few seconds..
I haven't tried that long distance but i think it should work because we are dealing with serial communication. The higher the baud rate, the shorter the cable should be. So the real question would be: how high the baud rate can be at 3 meters? So, it should work. You just need to not use too high baud rate
great tutorial thanks a lot. i have been jiggling around with my nextion. i m just curious, do we need to have arduino or some microcontr to tell nextion to do things ..like change page after button press or change value of slider etc. or the logic can be implemented into nextion using editor ?
The integrated processor on the display can handle all that. Watch my 2nd video tutorial where I show that: ruclips.net/video/mdkUBB60HoI/видео.html We usually use it for changing pages.
hello again. I have a project that has multiple pages. my page "main" has a number box n0. I want to send a numerical value to this box n0 through arduino. Is this done using this? Serial.print("main.n0.val="); or is there a different way for mapping this? Thanks a lot in advance.
As far I remember, you can't send page+object like that. If you want to send a value to an object on a particular page, even if the page is not seen, first make that box object "global" (there's a check mark to set this) and then in arduino send the normal command "n0.val=123".
perfect. I am recieving Octal format numbers while I am using serial read and Print to Serial Monitor. Is there any tecnhnique to exctract the commands come from NExtion Display without Itead library? Because the library has alots of bug and delaying my stepper.
@@interlinkknight I have fınally done without nextion libray. But some special technique. I gues I must do tutorial for it. Now my stepper run smooth while lcd sends command and mcu send feed.
did you tried to run a nextion on a nano 33ble or iot? it seems that there are some incompatibility with the software serial,,, do you know a solution?
Looking at possible getting one of these but in your experience, how do these screens do with things like XoD and whatnot? What's the latency on one of these?
Hello friend, what is the probability or possibility of adapting an Arduino Nextion Display code to an SPI Display? These Nextion Displays are very expensive! Thanks
Not possible. The nextion display has its own microcontroller so arduino only sends and receives serial data to the nexiton display, meaning that all the drawing of the display is done by the microcontroller of the nextion display. With a simple SPI display, arduino has to draw everything manually so it works in a completely different way. I know they are expensive, but the internal processor and using the nextion editor is what makes it possible to make such complicated graphics in a simple way.
Hi...im trying to add another layer of color changes on the timer, im trying to use the following command, but i keep on having error: // Change color of number to red if value is high enough: if (n0.val >= 90) { n0.pco = 63488; // Change the color of the number to red } if (n0.val >= 91 && n0.val 180)) { n0.pco = 0; // Set the color of the number to black } can you kindly help?
Are you using part of my code to add your own. Right? Just look at the difference between yours and mine (that works) and you will see the problem. The nextion editor is very strict that it doesn't allow spaces, parenthesis, etc. where it should not be, so pay attention to those small details.
Kinda. You can display any data you want, but it needs to have a format so it's going to ignore anything else. A real serial monitor would display everything. The closest thing would be using multiple serial ports, and printing one of the ports on the display. Like convert everything of one port into text and send it to the nextion display in a separate serial port. That might be possible.
Hii Interlinkknight good job!!! but has doubt about pin configuration with arduino mega 2560. TX RX 1,2,3. which one to use and how to change in code as well.
More information about that in here: ruclips.net/video/oJuL0hNk2eU/видео.html You can use either serial number you want. Just make sure to plug the display in the same Serial number you set the configuration file and sketch.
Dear, is there any editor for type of LCD and TFT screen to create the layout and use widget like you are using in your tutorial ? Best Regards Youssef
@@interlinkknight Thanks for quick answer, do you know if there is any other editor or a library with different widget or components l: OLED 0.96" I2C/SPI Display I 'd like to use vertical bargraph for audio PPM and waveform for spectrum analyzer and some naviagtion pages for setup. Thanks if you could route me to the correct direction. Again thanks for your tutorial ruclips.net/video/0FMs0hA4Xzo/видео.html
Is there a command to start a new line in the serial monitor after writing the command? it doesn't look clean and you cant go back and see what the program did.
So after the write command, for example. When you say serial write, write, write 3 times... if you say println it messes up the communication because now if you attempt to write the values again, it will try to send whatever you printed in the serial monitor. I would like to start a new line AFTER writing to the display.
Using the original gauges, no. But there's a way to make custom gauges using a bunch of images but it's much more complicated. I show that in the video tutorial #4
hey , I wanna ask a qustion about arduino. Lately I was trying to display picture on the TFT touch screen ,and what I want to achieve is when time goes by the picture will blur and you have to touch the screen the way just like you wipe the dust off you picture frame in order to make the picture as sharp as before.... How am I gonna code this ,and which direction should I go for.... A million thxs ahead !
Thank you for your video. In Arduino codes, I don't know which codes perform sending data to display. You use only 'Serial.print' and 'Serial.write'. Have these code sending data to display?
I have a question please what if we want to end the progress bar as the number reaches 200? and start it over ? i mean beginning is 0 and the end is 200 for progress bar. it reaches the end around 100 . i want it to reach the end by 200, how i can do that? thanks
How did you get the images to be centred for the gauge. When I create an image with the same dimensions as the gauge and set it as the crop image it is offset. How did you overcome this?
@@interlinkknight Ok I asked on the forums and they said the same. So now I understand how the crop image works. How did you make the backgrounds? Which software did you use?
Thanks for the video. I wonder if when showing colour RGBs it would be more readable if they are in hex, plus the time for refresh is in mS which is milliseconds not microseconds.
I don't think it supports HEX data. And you are right, I realized my mistake about milliseconds after a few weeks I posted the video but I can't change that.
InterlinkKnight that’s programmers for you! As for the microsecond thing I have do love you lots love bf xxx a lot worse. Thanks for replying and keep up the good work on your projects!
Hope ur Still there because i have some Problems with my Arduino MEGA 2560 and the Nextion Enhanced Display When i dont change a single thing in your Arduino Sketch, the serial LED TX goes crazy and in the Serial Monitor there are all the serial things he wants to send i asume. However the Nextiondisplay doesnt care at all it jsut stays frozen and Nothing happens. If i change every "Serial" in the Arduino Sketch to Serial2, the TX LED doesnt light up anymore and the serial Monitor also says nothing. Nextion display still Frozen. Can u Help me to get my Nextion Display Running with Arduino Mega 2560???? I spent soo many hours allready and still doesnt work. getting bit frustrated... thanks
With the nextion display you can do advanced things with much less effort. From loading images, having touch buttons, sliders, gauges, having multiple pages, etc. If you would try to do what I show on the beginning of the video (the gauges for my jet engine model), you would spend over a month of work using a conventional display+arduino, and I bet it would still not look as nice as the nextion display. But if you just need to show a little of text or numbers, the nextion would be overkill. A conventional display is fine for simple projects. What project do you have in mind?
hi, i can see the jet engine monitor... if i need do an acctitude indicator ADI, HSI, RMI...... an efis panel.. how to do a picture rotate in 360 degres in 2 axis or how to draw in nextion based in code lines ? please help me
so when i plug in the nextion to my computer, and launch into the game, the nextion doesnt receive and data from the game, any clues why this has happened?
@@interlinkknight what i mean by that, is im using the nextion for a dashbourd, like in a car, for my racing games. it used to work, but now it doesnt change anything on the screen when im driving.
@@interlinkknight ok, ill try. also if this helps, im using an sd card to put the tft file on the nextion, as something happened to it and it doesnt work just plugging it in the uploading the tft to the nextion
Thanks for the video , was wondering tho you never showed how to copy say a gauges from ones already created for instance the ones you have on the jet interface what if say I wanted to have six gauges instead of 4
great tutorial, but i have some problem. i'm all ready watch your second video but my arduino to nextion lcd still no respon, i used nextion basic 3.2", what should i do to fix it?. thx
Are you trying with Arduino uno or nano? Did you change the setting file on the nextion library folder like I mentioned on the sketch? Did you download the library from the link on the description? Make sure you do all that and it should work.
finally i'm switch tx-rx nextion to arduino uno/nano nextion lcd basic tx pin --> rx arduino nextion lcd basic rx pin --> tx arduino it work, but only the code from example library did it.
Hello, Thank you for all Tutorials. i have Problem with my Win 7, IDE 1.8.16. An error occurred while uploading the sketch avrdude: ser_open(): can't open device "\\.\COM5": Access is denied. if you have solution plaese Help!
That's a problem not related to my sketch. It's more about your Arduino and your computer. Have you ever uploaded sketches to that Arduino you are using?
Can we not have delays in the nextion display because when i used our tutorial without delay it works perfectly but when i use the display to measure rpm using hall effect sensor.... using delay the numbers are not even moving! Please help!
@@interlinkknight Yeah! I still can't send data from arduino to the screen! I used all your troubleshooting tips too.....but all in vain. I even did upload in both Mega as well as Uno after following your tutorial and troubleshooting! I still can't figure out the problem.....In a hurry! And moreover i want to display time using ds3231 rtc module on my nextion screen model NX4024T032_011 which is not the enhanced version of nextion display! I also want to display the fuel flow meter through the pipe using the flow meter sensor and I'm facing the same problem in that too! Please help! And sorry for bothering you so much!
I don't know. I mean, many people had tried my examples and they work. What are you doing differently than me? Especially sending data to the display, which doesn't require even the library. Not sure how to help. Try to copy everything exactly as I show in the video. Try in every baud rate. Connect ground of the display with arduino.
@@interlinkknightI copied your code to see if that works and to my surprise that worked but my code didn't work! I can mail you my code and the HMI file and possibly you can help? I'll try to change the baud rate and connect the ground of the display and see if it changes anything... I need it urgently by 16th
Please help! I'm having problem while getting value from display for command n0.getValue(&num). I got this error in return "recvRetNumber err". All other things are working fine with nextion.
hi sir . nice project. i planning builder like gauge, fmc, for fsx. but i dont know how write script at arduino. any suggestion link for the downd load scripts
Great video, I really wanted to see what code you need to type in the arduino to press that 'next' button on your screen. I have declared all the buttons in my nextion at the top of my arduino code but i dont know what to type in the loop to press a button when a sensor on my arduino board is triggered. Help please!!
You mean next page button? That's on the nextion project, not arduino. I don't understand your problem. Did you watched part 2? On my 2nd video I showed all about buttons.
Sorry i explained that poorly. On my nextion i have 3 pages, and on the first page i have a button (b0) that links to page 2. Now I want to press that button from the arduino when an infrared sensor is detected, to change the page in the nextion. your second video shows how buttons can control the arduino light, but i want the arduino to control the nextion button, kind of the other way around, i hope this makes more sense!
Oh, that's easy. Did you notes that on my example file of the 2nd tutorial I have a button called "next" that changes the page? The command is on the "Touch press event" of the button. If you look there you will see the only line there is: "page 1". Since you want to do it from arduino, just send "page 1". And don't forget adding the 3 lines after that: Serial.write(0xff); Serial.write(0xff); Serial.write(0xff);
This is what i thought, its such an easy thing to do im just having problems. This is my code to change between two pages depending on the sensor reading, look okay? it has no errors and uploads, just does nothing when the IRsensor reading changes, just stays on the first page on the nextion file. Sorry to keep pestering, you have helped a very long way through this uni project! const int IRLed = 13; const int IRSensor = A0; #include int variable1= 0; int counter = 0; int CurrentPage =0; NexButton b0 = NexButton ( 0, 1, "b0"); NexButton b1 = NexButton ( 0, 2, "b1"); NexButton b2 = NexButton ( 1, 1, "b2"); NexButton b3 = NexButton ( 1, 2, "b3"); NexButton b4 = NexButton ( 2, 1, "b4"); NexButton b5 = NexButton ( 2, 2, "b5"); NexText t0 = NexText (0, 3, "t0"); NexPage page0 = NexPage(0, 0, "page0"); NexPage page1 = NexPage(1, 0, "page1"); NexPage page2 = NexPage(2, 0, "page2"); NexTouch *nex_listen_list[]= { &b0, &b1, &b2, &b3, &b4, &b5, &t0, &page0, &page1, &page2, NULL }; void page0PushCallback(void *ptr) { CurrentPage = 0; } void page1PushCallback(void *ptr) { CurrentPage = 1; } void page2PushCallback(void *ptr) { CurrentPage = 2; } void setup() { Serial.begin(9600); pinMode(IRLed, OUTPUT); pinMode(IRSensor, INPUT); page0.attachPush(page0PushCallback); // Page press event page1.attachPush(page1PushCallback); // Page press event page2.attachPush(page2PushCallback); // Page press event } void loop() { digitalWrite(IRLed, HIGH); int SensorStatus = analogRead(IRSensor); Serial.println(SensorStatus); if(SensorStatus >=400) { "page 0"; Serial.print(0xff); Serial.print(0xff); Serial.print(0xff); //press nextion button for top bar } else {
Serial.print("no skid risk, click top bar screen"); "page 1"; Serial.print(0xff); Serial.print(0xff); Serial.print(0xff); // press nextion button for skid risk // delay for 5 seconds // press nextion button for clear road // delay for 5 seconds } }
Your code is wrong. If you want to send something through serial, you need to write it like this: Serial.print("page 1"); Serial.write(0xff); Serial.write(0xff); Serial.write(0xff); You should pay attention to the example files. Use them to learn how to code.
In terms of code, memory, speed and amount of pins, both work the same. The nano actually is better in my opinion because has 2 more analog pins and it fits in a breadboard.
Yes, it has backlight. You can buy it in here: www.itead.cc/display/nextion.html There are many sizes and you can choice between basic model or enhanced. For most projects, the basic version it's enough.
Hi and thanks for your tutorial, I bought the nextion 3,5 advanced display and I try to load the second tutorial hmi, I did connect the display to arduino uno and load you example.. every things working but not the buttons.. I mean the button trigger the event on arduino but nothing appen. May somebody help ? Thanks very much.
Anyone have any clue how you would use the arduino to say go to a specific page without a button using serial? I am also assuming I would need to write something in the hex him and I t may seem unnecessary but I’m trying to use a camera that so that if an object is recognized it turns it to a page without pressing any buttons
been using my Nextion for over a year now with my Arduino, but it's developing graphical glitches. last year I got a random white line 1 pixel wide going down the screen, and this year another has appeared. I tried reuploading everything to it but it seems stuck. Do you or anyone else have these problems? I'm wondering if there's a surge in my 5V circuit where I should be using a capacitor or something, or maybe it's not designed to be left on all the time even with the screen faded to zero
:( Was too long ago? If not, try contacting ebay. If was a long time ago, then I don't think there is much you can do. Maybe try to fix it? You don't see difference touching and moving internal parts of the display? Maybe something is loose. I bought mine directly from itead.
hi, great video. can you send me pls part of the arduino code + nextion code + lib needed to be includede.? I'm trying to switch relays via my nextion.
Please check the Arduino download sketch attached to the video 1 as it looks completely different? I’m having problems using the USB port to connect to the Nextion, would be nice to have a working sketch to work from.
I checked and I repeat, it works fine. Hundreds of people downloaded the sketch and they never complained. You are clicking the wrong link or something. You need: My example nextion project file #1 My example arduino sketch file #1
You mean the gauges shown on the beginning? That's for a jet engine model that I am working on. It's not finished. That's why I didn't published the files. But if you really want it, I just upload it and put it on the description. Check now.
I'm not sure, but you can always try to buy it online. On ebay there are very cheap arduino clones from china. Not sure they ship to africa, but you can try.
I can't make the display send the value of the state (ex. bt0.val) of a button. It always sends the code of the attribute and not the value. Compilator of its side doesn't accept any if-else statement (ex.if(bt0.val=0) {...} it aways gives me: Error:SYNTAX ERROR:must end with ")":if(bt0.val) { printh "1"} else { printh "2"}( Double click to jump to code) Can somebody guide me through this PLEASE
Excuse me may i ask you please make another tutorial about how to make a password keypad including numbers 0-9 and Clear and Enter buttons and how to show the numbers in field Stars or filled circles instead of actual numbers (you know like passwords in cellphones)...and after that lead us to a page in which we can turn on and off a LED....and an extra option for changing the password will be great, i'll appreciate if you make this tutorial, i've got a project in university that needs this program . thank you very much
Im having a very bad time trying to increase the baud rate for mi nextion 7inc display. I used your exact code and the Display frezze. Can I have some suggestions. Thanks in advance.
When you say the display freeze, what exactly do you mean? The display stop executing internal timers, or just doesn't read what arduino is sending? If is the first, increase the delay on the loop. If is the second, increase the delay on the setup before you send the command to change the baud rate.
is the second.. and already increse the delay to 2000ms before and after sending the baud command. I see in the Serial Monitor the command is sended ok, but the LCD aparently not change its baud rate.
void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(9600); delay(2000); Serial.print("baud=115200"); Serial.write(0xff); Serial.write(0xff); Serial.write(0xff); delay(2000); Serial.end(); // terminate serial communication at 9600 bps delay(2000); Serial.begin(115200); initialize serial communication at 115200 bps } This is how i done it ... dont know whats wrong... .... thanks in advance
Try sending the change baud but keep arduino at 9600 to confirm that the display is just ignoring that command. If its that, try changing the default baud adding an s at the end (bauds).
Hi. I send the changing baud rate commands keeping the arduino baudrate in 9600bps and the LCD ignore the commands. Also tried the bauds command and nothing happens... The LCD continues communicating with the Arduino at 9600.
Hey my friend, thank for your vídeo! I have a problem, ¿Can you help me? I need ejecute one "while" cicle, I put it on sub-rutine that one button: void b12PopCallback(void *ptr) { var = 1; while (var == 1) { digitalWrite(s1,LOW); digitalWrite(l1,LOW); digitalWrite(s2,LOW); digitalWrite(l2,LOW); delay(500); digitalWrite(s1,HIGH); digitalWrite(l1,HIGH); delay(7000); digitalWrite(s1,LOW); digitalWrite(l1,LOW); delay(500); digitalWrite(s2,HIGH); digitalWrite(l2,HIGH); delay(7000); digitalWrite(s2,LOW); digitalWrite(l2,LOW); } } But I need with other button in the nextion pant get out of the cicle... And I can't, because I don't know how listen a button in the nextion, inside sub-rutine of other button. Please HELP ME!
You really should avoid using delays like that. I usually create counters that go up each cycle and reset when reach a limit to execute something after some time, instead of using delays. You can also have delays without using delays, but instead use the common millis() strategy. There are many ways to deal with delays without using delays. My suggestion is to do that. I would avoid using while loops too because if they lock in a task, the nextion display could send an event and arduino could miss that for being busy in the while loop.
Now I use "millis()", and I try put a Flag in the "b12pop...." and ejecute the "While" in the "loop" with flag as conditional... I writing now, I hope that all right...
I always use this type of delay: /* This is an example of how to put a delay using a counter of cycles. The counter will increase by 1 each cycle and when the counter reach the desire amount, we can excecute anything we want, and reset the counter to 0 to start over again. */ int countertimer; // Counter to store the amount of cycles that had passed const int counterAmount = 100; // The amount of cycles to wait void setup() // Start of setup { pinMode(13, OUTPUT); // Stablish pin 13 as output } // End of setup void loop() // Start of loop { delay(10); // Very small delay, but we don't really need this if(countertimer > counterAmount) // If counter reach the limit { // Put whatever you want to do when counter reach the limit: if(digitalRead(13) == LOW) // If LED on pin 13 is off { digitalWrite(13, HIGH); // Turn the LED on pin 13 on } else // If LED on pin 13 is on { digitalWrite(13, LOW); // Turn the LED on pin 13 off } countertimer = 0; // Reset counter to 0 to start over } else // If we didn't reach the limit { countertimer++; // Add 1 to counter to keep waiting } } // End of loop
I completely agree with you. All videos after this one don't have music. But I don't think there's an option to remove the music of this video after uploaded
Each command that is transmitted to the Nextion serially must be terminated. For this purpose the 3 lines "0xff" are used.You can also output all 3 in one line: Serial.print ("\xFF\xFF\xFF"); Or like this e.g. "change page": Create String Variable: String TRM = "\xFF\xFF\xFF" // Terminator for Nextion (globally before setup) Serial.print ((String("page 2") + TRM)); // Change to page two For more info: nextion.tech/instruction-set/ Right at the beginning under 1-1 P.S. don't copy & paste - Read, learn and comprehend :-)
This video got me started with the Nextion Display. It also inspired me to create about 30 videos on youtube to help others. Thanks a ton for your inspiration.
Hey, that's great! I'm really glad that it was useful to you and that you are helping others.
I like that you supply working example code and not only explain it well in the video, but the code is commented really good. I'm no programmer, so this makes it much easier for me. Thank you very much!
I'm glad that it was useful to you. Yes, my intention was to give as much information in the code itself so it's easier to understand. Enjoy!
Just want to say thanks so much for teaching me so much about how to do this. I have fully learned how to programme an amazing looking touch GUI in the space of 12 hours. I couldn't do this yesterday .. Keep doing these amazing video posts !
I'm so happy to know I could help. I'm not making more videos about the nextion display because i think i covered the most relevant stuff. Unless you think i missed something?
@@interlinkknight No you didn't miss anything :)
One of the best examples on youtube for the Nextion display. Great Job!
Thanks. My next tutorial it's going to be much better. Trust me.
Fantastic !!!. I have had a Nextion display for a while and have not been able to understand how to connect it with an Arduino this video is fantastic, great work and very well explained, music or no music great !!!!!!!! Keep up the good work for newb's like me
I am glad. My second video is coming very soon, and is about sending data from the display to arduino. Stay tuned...
Thank you for the concise clear explanation of how to simply send text to the nextion display. Kudos!
I am glad you find it useful. If you have any question, let me know.
This helps sooooo much when making a menu with pictures and touch buttons and stuff. Doing all in the video by code only would take days.
Muito bom!! Fiz muitos testes para entender como funciona o display usando apenas um Arduino nano e o IDE da Nextion que simula o display no notebook.
Treinei 100% dos comandos que precisei usar na minha aplicação com o PIC usando o Arduino Nano e depois fiz as bibliotecas em C para PIC compilador CCS e funcionou tudo.. Parabéns pelo Tutorial.
thanks for a great project site, already thinking of ideas to enhance my simulators, F1, and Flight
Thanks for the tutorial..
You guys can use this following code to reduce total line.
in loop section;
sendNoticeToNextion("t4.txt","Hello from arduino..");
after the loop section;
void sendNoticeToNextion(String file,String text) // string file must be the object name from nextion display.
{
String command = String(file)+"=\""+String(text)+"\"";
Serial.print(command);
endCommand();
}
void endCommand() // we called this part of code from other void
{
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
}
Don't you think that strategy makes it more complicated and confusing? Everybody is free to write the code as they want, but to be honest I think is better keep all contain and clear putting the last 3 "Serial.write(0xff);" commands together everytime we send data to the display. At least your approach uses less memory?
i guess.. i am working on a project that uses a lot of sensors.so arduino side of the project is really messy right now that's why i have to simplify it as much as i can..
Ok. If you check if your strategy uses less memory (flash and RAM) over my strategy, let me know which one is best. I am curious.
won!This is first time I have seen our Chinese HMI screen module on the RUclips!
Do you mean that you had anything to do with the production of the nextion display?
There is a company address on the Nextion's website,It's really shenzhen.But we're not going to call it Nextbalbala,and it's very cheap in China.umm,but the packaging is not well.like your display,just need cost 98RMB(14.7$)in the TAOBAO.
Easiest tutorial ever ! Can't wait for the second tutorial
I am glad it was helpful for you. I have a lot done for the 2nd and 3rd video, but hurricane Irma just pass on florida a few days ago, and that slow me down. I live in Miami and I travel to the north to pass the hurricane in a safer area. Luckily for me, my home its fine and I can comeback soon to resume normal life and my youtube videos. These videos are taking more time than normal for that reason, but trust me their coming. I even bought a new decent microphone so my voice its going to sound more clearly.
Anyway, thanks for the support and stay tuned for the next videos.
Cheers.
2nd video tutorial is uploaded. Here: ruclips.net/video/mdkUBB60HoI/видео.html
Awesome video! Just what I was looking for. Thank you for your time.
Amazing you can play guitar and program your Nextion at the same time!
Brother, thank you for all the efforts you're putting in these videos they are very informative and well explained, i really appreciate it especially for students (19yo Btw)👌
many thanks for the clearly explanation. Keep up the good work
I have no “User MCU” option on the debug screen. And anything I send to the nextion is not received. I feel as if I’m missing something important. Any thoughts?
Thanks for sharing ! I discover both your channel, and the nextion display. Subscribed and wondering where I have been, since it looks like this display has been covered numerous time on channel I already follow. Thanks again !
The display has been available for only a few years so it's understandable that you didn't knew about it. Thanks for your support and remember that if you need help, you can count on me.
Hi, I tried to follow your video but something doesn't work, it seems as if the nextion can't read the serial. My datas are not updating, any advice on how to resolve this?
First, follow my troubleshooting video
excellent tutorial, hoping to see more on sending and receiving data... thanks
I did accomplish to send data from the display to arduino and it works pretty good. Right now I am working on the video tutorial for that. Should be ready for youtube in around 1-2 weeks. I am not the kind of guy that say "subscribe" but you really should if you want to know when the video is on my channel.
subscribed....
Hi
in Timer Event i wrote this code
if (n0.val > 99)
{
n0.pco = 63488
}
else
{
n0.pco = 0
}
if ( z0.val! = va0.val)
{
z0.val = va0.val
}
But after compiling it says
Error: :if (n0.val > 99)( Double click to jump to code)
Error: SYNTAX ERROR: Extra "{":{( Double click to jump to code)
May you tell me what can be the problem?
Thank you.
I am not sure but clearly you wrote something invalid. What? Compare your code to mine and see what's the difference.
Do you know if this display will work over long distances like 3 meters? I am trying to do a project where arduino sits in the back of a car and the screen on the dashboard. Tried with TFT display and the output was broken with no display after few seconds..
I haven't tried that long distance but i think it should work because we are dealing with serial communication. The higher the baud rate, the shorter the cable should be. So the real question would be: how high the baud rate can be at 3 meters?
So, it should work. You just need to not use too high baud rate
@@interlinkknight Thanks. I need to try but first need to get that nextion display which doesn't seem to be available here. :(
Thanks for your tutorial! It is best tutorial about Nextion!
great tutorial thanks a lot. i have been jiggling around with my nextion.
i m just curious, do we need to have arduino or some microcontr to tell nextion to do things ..like change page after button press or change value of slider etc. or the logic can be implemented into nextion using editor ?
The integrated processor on the display can handle all that. Watch my 2nd video tutorial where I show that: ruclips.net/video/mdkUBB60HoI/видео.html
We usually use it for changing pages.
thanks for quick reply
hello again. I have a project that has multiple pages. my page "main" has a number box n0. I want to send a numerical value to this box n0 through arduino. Is this done using this? Serial.print("main.n0.val="); or is there a different way for mapping this? Thanks a lot in advance.
As far I remember, you can't send page+object like that. If you want to send a value to an object on a particular page, even if the page is not seen, first make that box object "global" (there's a check mark to set this) and then in arduino send the normal command "n0.val=123".
Very good, easy to follow, Thanks
Nice tuorial. Is there a library where I can find images for buttons, sliders etc?
I don't know
perfect. I am recieving Octal format numbers while I am using serial read and Print to Serial Monitor. Is there any tecnhnique to exctract the commands come from NExtion Display without Itead library? Because the library has alots of bug and delaying my stepper.
There are, but so far i haven't find one that is reliable
@@interlinkknight I have fınally done without nextion libray. But some special technique. I gues I must do tutorial for it. Now my stepper run smooth while lcd sends command and mcu send feed.
Thank you! This tutorial help me a lot :) Good job!
:)
What is the name of the software sir
This was extremely helpful. Thanks!
did you tried to run a nextion on a nano 33ble or iot? it seems that there are some incompatibility with the software serial,,, do you know a solution?
I never tried with that
Looking at possible getting one of these but in your experience, how do these screens do with things like XoD and whatnot? What's the latency on one of these?
I only use it with arduino. I can't notice any latency
Hello friend, what is the probability or possibility of adapting an Arduino Nextion Display code to an SPI Display? These Nextion Displays are very expensive! Thanks
Not possible. The nextion display has its own microcontroller so arduino only sends and receives serial data to the nexiton display, meaning that all the drawing of the display is done by the microcontroller of the nextion display.
With a simple SPI display, arduino has to draw everything manually so it works in a completely different way.
I know they are expensive, but the internal processor and using the nextion editor is what makes it possible to make such complicated graphics in a simple way.
Hi.. How did you programmed for Next and Back button for changing the page?.. please explain
I show that in tutorial #6
@@interlinkknight thank you
Hi...im trying to add another layer of color changes on the timer, im trying to use the following command, but i keep on having error:
// Change color of number to red if value is high enough:
if (n0.val >= 90)
{
n0.pco = 63488; // Change the color of the number to red
}
if (n0.val >= 91 && n0.val 180))
{
n0.pco = 0; // Set the color of the number to black
}
can you kindly help?
Are you using part of my code to add your own. Right? Just look at the difference between yours and mine (that works) and you will see the problem. The nextion editor is very strict that it doesn't allow spaces, parenthesis, etc. where it should not be, so pay attention to those small details.
thanks for you videos ,i have question,is there a possibility to make nextion display like a serial monitor of arduino?
Kinda. You can display any data you want, but it needs to have a format so it's going to ignore anything else. A real serial monitor would display everything.
The closest thing would be using multiple serial ports, and printing one of the ports on the display. Like convert everything of one port into text and send it to the nextion display in a separate serial port. That might be possible.
Hii Interlinkknight good job!!!
but has doubt about pin configuration with arduino mega 2560.
TX RX 1,2,3. which one to use and how to change in code as well.
More information about that in here: ruclips.net/video/oJuL0hNk2eU/видео.html
You can use either serial number you want. Just make sure to plug the display in the same Serial number you set the configuration file and sketch.
Dear, is there any editor for type of LCD and TFT screen to create the layout and use widget like you are using in your tutorial ?
Best Regards
Youssef
This editor only works with nextion displays
@@interlinkknight Thanks for quick answer, do you know if there is any other editor or a library with different widget or components l: OLED 0.96" I2C/SPI Display
I 'd like to use vertical bargraph for audio PPM and waveform for spectrum analyzer and some naviagtion pages for setup.
Thanks if you could route me to the correct direction.
Again thanks for your tutorial ruclips.net/video/0FMs0hA4Xzo/видео.html
Not that i know of
may be possible to use a bigger nexiom screen?
Look at their website. They have bigger screens
Is there a command to start a new line in the serial monitor after writing the command? it doesn't look clean and you cant go back and see what the program did.
Serial.println();
So after the write command, for example. When you say serial write, write, write 3 times... if you say println it messes up the communication because now if you attempt to write the values again, it will try to send whatever you printed in the serial monitor. I would like to start a new line AFTER writing to the display.
Then, I suppose you can't. Commands sent to the display are not really suppose to be monitor. Debugging should be done in a different serial port.
InterlinkKnight okay thanks. Thought that might be the case. I appreciate your tutorials.
No problem. Good luck.
Quick question, do you know a way to avoid the gauge needles to flicker?
Using the original gauges, no. But there's a way to make custom gauges using a bunch of images but it's much more complicated. I show that in the video tutorial #4
How do you call Arduino functions? Thanks for the vid.
In part 2 i show how to send data from the display to Arduino
@@interlinkknight Great, thx a bunch!
hey , I wanna ask a qustion about arduino. Lately I was trying to display picture on the TFT touch screen ,and what I want to achieve is when time goes by the picture will blur and you have to touch the screen the way just like you wipe the dust off you picture frame in order to make the picture as sharp as before.... How am I gonna code this ,and which direction should I go for.... A million thxs ahead !
I can't think a way to do that with arduino
Thank you for your video.
In Arduino codes, I don't know which codes perform sending data to display.
You use only 'Serial.print' and 'Serial.write'.
Have these code sending data to display?
Download my code and you'll see what I use. My recommendation is to try my examples, instead of writing code from scratch
@@interlinkknight Okay. I'll try it. Thank you.
I have a question please
what if we want to end the progress bar as the number reaches 200? and start it over ? i mean beginning is 0 and the end is 200 for progress bar. it reaches the end around 100 . i want it to reach the end by 200, how i can do that? thanks
Not possible, but you can always remap numbers in arduino.
Is it possible to output a video on this display? What are the requirements for a video file? Nice tutorial though!
No
How did you get the images to be centred for the gauge. When I create an image with the same dimensions as the gauge and set it as the crop image it is offset. How did you overcome this?
You need to create a background image with the gauge picture. The resolution of the background image has to be the same as your display
@@interlinkknight Ok I asked on the forums and they said the same. So now I understand how the crop image works. How did you make the backgrounds? Which software did you use?
I use PowerPoint because I know a lot on how to use it. Not necessarily the best option for other people.
@@interlinkknight lol not sure if this is a troll comment
What do you mean? I did use PowerPoint to make the background image
Thanks for the video. I wonder if when showing colour RGBs it would be more readable if they are in hex, plus the time for refresh is in mS which is milliseconds not microseconds.
I don't think it supports HEX data. And you are right, I realized my mistake about milliseconds after a few weeks I posted the video but I can't change that.
InterlinkKnight that’s programmers for you! As for the microsecond thing I have do love you lots love bf xxx a lot worse. Thanks for replying and keep up the good work on your projects!
Hope ur Still there because i have some Problems with my Arduino MEGA 2560 and the Nextion Enhanced Display
When i dont change a single thing in your Arduino Sketch, the serial LED TX goes crazy and in the Serial Monitor there are all the serial things he wants to send i asume. However the Nextiondisplay doesnt care at all it jsut stays frozen and Nothing happens. If i change every "Serial" in the Arduino Sketch to Serial2, the TX LED doesnt light up anymore and the serial Monitor also says nothing. Nextion display still Frozen. Can u Help me to get my Nextion Display Running with Arduino Mega 2560???? I spent soo many hours allready and still doesnt work. getting bit frustrated... thanks
First test on an Arduino uno or nano, using my sketch without any modifications
Thanks that was really helpful
Hello, what will be the gain in a broader way, from Nextion to a simple LCD display?
With the nextion display you can do advanced things with much less effort. From loading images, having touch buttons, sliders, gauges, having multiple pages, etc. If you would try to do what I show on the beginning of the video (the gauges for my jet engine model), you would spend over a month of work using a conventional display+arduino, and I bet it would still not look as nice as the nextion display.
But if you just need to show a little of text or numbers, the nextion would be overkill. A conventional display is fine for simple projects. What project do you have in mind?
Ooh thanks!
Salut est-il possible de dupliqué l'affichage de l'écran nextion, sur un écran tv via un module arduino VGA ?
Not possible. Maybe buy a nextion display big enough, if you need a big screen
Could you send texts only through the serial port and appear on the nextion screen?
To send data to the display you need to send the object name, the text and the 3 finishing lines.
How are you able to display floats? I have such a hard time with some of this but you make it seem so easy : )
They are actually 2 different objects and arduino send them independently. You just have to add the dot between both objects.
where can I find samples of Arduino and Nextion code that will work my NX4024T032 3.2" display?
My examples work with any display size. Just modify it a little
hi, i can see the jet engine monitor... if i need do an acctitude indicator ADI, HSI, RMI...... an efis panel.. how to do a picture rotate in 360 degres in 2 axis or how to draw in nextion based in code lines ? please help me
No idea
so when i plug in the nextion to my computer, and launch into the game, the nextion doesnt receive and data from the game, any clues why this has happened?
Game? I'm not sure what you mean. This is not a monitor
@@interlinkknight what i mean by that, is im using the nextion for a dashbourd, like in a car, for my racing games. it used to work, but now it doesnt change anything on the screen when im driving.
Check the wires. Upload my example files for testing. Maybe it broke?
@@interlinkknight ok, ill try. also if this helps, im using an sd card to put the tft file on the nextion, as something happened to it and it doesnt work just plugging it in the uploading the tft to the nextion
Thanks for the video , was wondering tho you never showed how to copy say a gauges from ones already created for instance the ones you have on the jet interface what if say I wanted to have six gauges instead of 4
I don't understand your question.
Is it possible to copy any of the elements displayed wen creating the interface ?
Yes, you can copy and paste objects while editing.
great tutorial, but i have some problem. i'm all ready watch your second video but my arduino to nextion lcd still no respon, i used nextion basic 3.2", what should i do to fix it?. thx
Are you trying with Arduino uno or nano? Did you change the setting file on the nextion library folder like I mentioned on the sketch? Did you download the library from the link on the description? Make sure you do all that and it should work.
finally i'm switch tx-rx nextion to arduino uno/nano
nextion lcd basic tx pin --> rx arduino
nextion lcd basic rx pin --> tx arduino
it work, but only the code from example library did it.
What software are you using?
Nice video 👍👍
What application is used to create the program in HMI?
Nextion Editor
Hello, Thank you for all Tutorials.
i have Problem with my Win 7, IDE 1.8.16.
An error occurred while uploading the sketch
avrdude: ser_open(): can't open device "\\.\COM5": Access is denied.
if you have solution plaese Help!
That's a problem not related to my sketch. It's more about your Arduino and your computer. Have you ever uploaded sketches to that Arduino you are using?
Can we not have delays in the nextion display because when i used our tutorial without delay it works perfectly but when i use the display to measure rpm using hall effect sensor.... using delay the numbers are not even moving! Please help!
You mean delay in arduino?
@@interlinkknight Yeah! I still can't send data from arduino to the screen! I used all your troubleshooting tips too.....but all in vain. I even did upload in both Mega as well as Uno after following your tutorial and troubleshooting!
I still can't figure out the problem.....In a hurry!
And moreover i want to display time using ds3231 rtc module on my nextion screen model NX4024T032_011 which is not the enhanced version of nextion display!
I also want to display the fuel flow meter through the pipe using the flow meter sensor and I'm facing the same problem in that too!
Please help!
And sorry for bothering you so much!
@@interlinkknight Thanks in advance!
I don't know. I mean, many people had tried my examples and they work. What are you doing differently than me? Especially sending data to the display, which doesn't require even the library. Not sure how to help. Try to copy everything exactly as I show in the video. Try in every baud rate. Connect ground of the display with arduino.
@@interlinkknightI copied your code to see if that works and to my surprise that worked but my code didn't work!
I can mail you my code and the HMI file and possibly you can help?
I'll try to change the baud rate and connect the ground of the display and see if it changes anything...
I need it urgently by 16th
Please help! I'm having problem while getting value from display for command n0.getValue(&num). I got this error in return "recvRetNumber err". All other things are working fine with nextion.
You get that error when trying my example from my 2nd video?
Yes, I can't access value in n0/n1.. entered through nextion keypad, but sending value to n0/n1.. is working fine (as you said in tutorial#2)
Start by watching my troubleshooting video. If that doesn't work, send me an email with more details.
very great and well done. wow
Is this the HMI software compatible with any screen running on an arduino?
No. The nextion editor works only for nextion displays
hi sir .
nice project. i planning builder like gauge, fmc, for fsx. but i dont know how write script at arduino. any suggestion link for the downd load scripts
no idea. sorry
Great video, I really wanted to see what code you need to type in the arduino to press that 'next' button on your screen. I have declared all the buttons in my nextion at the top of my arduino code but i dont know what to type in the loop to press a button when a sensor on my arduino board is triggered. Help please!!
You mean next page button? That's on the nextion project, not arduino. I don't understand your problem. Did you watched part 2? On my 2nd video I showed all about buttons.
Sorry i explained that poorly. On my nextion i have 3 pages, and on the first page i have a button (b0) that links to page 2. Now I want to press that button from the arduino when an infrared sensor is detected, to change the page in the nextion. your second video shows how buttons can control the arduino light, but i want the arduino to control the nextion button, kind of the other way around, i hope this makes more sense!
Oh, that's easy. Did you notes that on my example file of the 2nd tutorial I have a button called "next" that changes the page? The command is on the "Touch press event" of the button. If you look there you will see the only line there is: "page 1". Since you want to do it from arduino, just send "page 1". And don't forget adding the 3 lines after that: Serial.write(0xff); Serial.write(0xff); Serial.write(0xff);
This is what i thought, its such an easy thing to do im just having problems. This is my code to change between two pages depending on the sensor reading, look okay? it has no errors and uploads, just does nothing when the IRsensor reading changes, just stays on the first page on the nextion file. Sorry to keep pestering, you have helped a very long way through this uni project!
const int IRLed = 13;
const int IRSensor = A0;
#include
int variable1= 0;
int counter = 0;
int CurrentPage =0;
NexButton b0 = NexButton ( 0, 1, "b0");
NexButton b1 = NexButton ( 0, 2, "b1");
NexButton b2 = NexButton ( 1, 1, "b2");
NexButton b3 = NexButton ( 1, 2, "b3");
NexButton b4 = NexButton ( 2, 1, "b4");
NexButton b5 = NexButton ( 2, 2, "b5");
NexText t0 = NexText (0, 3, "t0");
NexPage page0 = NexPage(0, 0, "page0");
NexPage page1 = NexPage(1, 0, "page1");
NexPage page2 = NexPage(2, 0, "page2");
NexTouch *nex_listen_list[]=
{
&b0,
&b1,
&b2,
&b3,
&b4,
&b5,
&t0,
&page0,
&page1,
&page2,
NULL
};
void page0PushCallback(void *ptr)
{
CurrentPage = 0;
}
void page1PushCallback(void *ptr)
{
CurrentPage = 1;
}
void page2PushCallback(void *ptr)
{
CurrentPage = 2;
}
void setup() {
Serial.begin(9600);
pinMode(IRLed, OUTPUT);
pinMode(IRSensor, INPUT);
page0.attachPush(page0PushCallback); // Page press event
page1.attachPush(page1PushCallback); // Page press event
page2.attachPush(page2PushCallback); // Page press event
}
void loop() {
digitalWrite(IRLed, HIGH);
int SensorStatus = analogRead(IRSensor);
Serial.println(SensorStatus);
if(SensorStatus >=400) {
"page 0";
Serial.print(0xff);
Serial.print(0xff);
Serial.print(0xff);
//press nextion button for top bar
}
else {
Serial.print("no skid risk, click top bar screen");
"page 1";
Serial.print(0xff);
Serial.print(0xff);
Serial.print(0xff);
// press nextion button for skid risk
// delay for 5 seconds
// press nextion button for clear road
// delay for 5 seconds
}
}
Your code is wrong. If you want to send something through serial, you need to write it like this:
Serial.print("page 1");
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
You should pay attention to the example files. Use them to learn how to code.
can you share the images for the gauges please
Why do you want the image? You can email me and I'll give it to you.
Would using a Arduino Uno be better than the Arduino Nano?
In terms of code, memory, speed and amount of pins, both work the same. The nano actually is better in my opinion because has 2 more analog pins and it fits in a breadboard.
@@interlinkknight thanks :) do you have any tips for making a voltage meter with dial value and gauge meter? Max voltage is 5V.
Quite simple. Measure an analog pin and remap value from 0-255 to 0-50. Add a dot on the display and you are good to go
@@interlinkknight 0-50, do you mean 0-5?
I mean 50. Using real decimals can get things complicated.
hello, when trying to execute my code it gives me this error: segmentation fault
What can be?
I never seen that error before
where can I buy one to try is it backlit?
Yes, it has backlight. You can buy it in here: www.itead.cc/display/nextion.html
There are many sizes and you can choice between basic model or enhanced. For most projects, the basic version it's enough.
Hi and thanks for your tutorial, I bought the nextion 3,5 advanced display and I try to load the second tutorial hmi, I did connect the display to arduino uno and load you example.. every things working but not the buttons.. I mean the button trigger the event on arduino but nothing appen. May somebody help ? Thanks very much.
Watch the troubleshooting video
Anyone have any clue how you would use the arduino to say go to a specific page without a button using serial? I am also assuming I would need to write something in the hex him and I t may seem unnecessary but I’m trying to use a camera that so that if an object is recognized it turns it to a page without pressing any buttons
That's easy. Just send in the serial: "page 1" and it will change to page 1. Remember to send the 3 finishing lines afterwards.
hello
how to build it
What is the name of the software. Please telme sir
Nextion editor
been using my Nextion for over a year now with my Arduino, but it's developing graphical glitches. last year I got a random white line 1 pixel wide going down the screen, and this year another has appeared. I tried reuploading everything to it but it seems stuck. Do you or anyone else have these problems? I'm wondering if there's a surge in my 5V circuit where I should be using a capacitor or something, or maybe it's not designed to be left on all the time even with the screen faded to zero
I've never seen that. Looks like a defective unit, to me. It's an LCD so should not have problems staying on all the time. Did you contacted itead?
I did, but they said it's nothing to do with them, I should contact the seller where I bought it from.
Where did you buy it?
ebay - when I try to look it up, seller has gone.
:(
Was too long ago? If not, try contacting ebay. If was a long time ago, then I don't think there is much you can do. Maybe try to fix it? You don't see difference touching and moving internal parts of the display? Maybe something is loose.
I bought mine directly from itead.
hi,
great video.
can you send me pls part of the arduino code + nextion code + lib needed to be includede.?
I'm trying to switch relays via my nextion.
Is already on the description
Could you please update the sketch for your Video 1 Arduino to Nextion as the link on your page does not link to the correct sketch
What do you mean? I just checked and works fine
The Arduino sketch I downloaded from the video is not the same as the example you use in the video.
I improved the sketch a bit, but it's basically the same sketch.
Please check the Arduino download sketch attached to the video 1 as it looks completely different? I’m having problems using the USB port to connect to the Nextion, would be nice to have a working sketch to work from.
I checked and I repeat, it works fine. Hundreds of people downloaded the sketch and they never complained. You are clicking the wrong link or something. You need:
My example nextion project file #1
My example arduino sketch file #1
what telemetry u use
Goodnight! friend i'm making a signal simulator. by the way do you know a good guy at creating an automotive obd2 program?
no idea. sorry
quiet. thanks!
InterlinkKnight could you upload the final project of HMI with gauges?
You mean the gauges shown on the beginning? That's for a jet engine model that I am working on. It's not finished. That's why I didn't published the files. But if you really want it, I just upload it and put it on the description. Check now.
Thank you! Got it. My idea to use it for real experemental aircraft. For exsample for rotax 912 motor.
Sounds great. Would be possible if you send me a picture or video when you finish?
InterlinkKnight of course send, when finish. What your email?
my channel name at gmail
im in ghana where can i get arduino board to buy
I'm not sure, but you can always try to buy it online. On ebay there are very cheap arduino clones from china. Not sure they ship to africa, but you can try.
why Serial.write(0xff)? Is it any different than Serial.print(0xff)?
Quick reason: it's faster
@@interlinkknight i see. Thanks
What is the size of tft?
How much?
Mine is 3.5" but there are other sizes from 2.4" to 7". Search on google for nextion display and you will see the prices.
InterlinkKnight
Super movie
What kind of matrix-screen model can you give your company and model?
Sorry but I don't understand your question.
I can't make the display send the value of the state (ex. bt0.val) of a button. It always sends the code of the attribute and not the value. Compilator of its side doesn't accept any if-else statement (ex.if(bt0.val=0) {...} it aways gives me: Error:SYNTAX ERROR:must end with ")":if(bt0.val) { printh "1"} else { printh "2"}( Double click to jump to code)
Can somebody guide me through this PLEASE
I have no idea how you expect to make that work. Use my example first. Then, use the code in the example to make your project.
this display only use serial port???????
Yes
can i know the name of your display model?
In the description
Why do you need Arduino? It seems like this display board has more powerful MCU
Yes, the display is more powerful but you need Arduino to tell the display what to show.
A number of LINKS don't work!!
how to coding arduino current sensor, voltage sensor and dust sensor gp2y1010au0f monitored to hmi nextion?
You need to find tutorial about those sensors
Excuse me may i ask you please make another tutorial about how to make a password keypad including numbers 0-9 and Clear and Enter buttons and how to show the numbers in field Stars or filled circles instead of actual numbers (you know like passwords in cellphones)...and after that lead us to a page in which we can turn on and off a LED....and an extra option for changing the password will be great, i'll appreciate if you make this tutorial, i've got a project in university that needs this program . thank you very much
I think all the information you need to do that is on my tutorials already. About the asterisk, maybe use an image.
Im having a very bad time trying to increase the baud rate for mi nextion 7inc display. I used your exact code and the Display frezze. Can I have some suggestions. Thanks in advance.
When you say the display freeze, what exactly do you mean? The display stop executing internal timers, or just doesn't read what arduino is sending? If is the first, increase the delay on the loop. If is the second, increase the delay on the setup before you send the command to change the baud rate.
is the second.. and already increse the delay to 2000ms before and after sending the baud command. I see in the Serial Monitor the command is sended ok, but the LCD aparently not change its baud rate.
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
delay(2000);
Serial.print("baud=115200");
Serial.write(0xff);
Serial.write(0xff);
Serial.write(0xff);
delay(2000);
Serial.end(); // terminate serial communication at 9600 bps
delay(2000);
Serial.begin(115200); initialize serial communication at 115200 bps
}
This is how i done it ... dont know whats wrong... .... thanks in advance
Try sending the change baud but keep arduino at 9600 to confirm that the display is just ignoring that command. If its that, try changing the default baud adding an s at the end (bauds).
Hi. I send the changing baud rate commands keeping the arduino baudrate in 9600bps and the LCD ignore the commands. Also tried the bauds command and nothing happens... The LCD continues communicating with the Arduino at 9600.
What is that software?
Nextion editor
Hey my friend, thank for your vídeo!
I have a problem, ¿Can you help me?
I need ejecute one "while" cicle, I put it on sub-rutine that one button:
void b12PopCallback(void *ptr) {
var = 1;
while (var == 1) {
digitalWrite(s1,LOW);
digitalWrite(l1,LOW);
digitalWrite(s2,LOW);
digitalWrite(l2,LOW);
delay(500);
digitalWrite(s1,HIGH);
digitalWrite(l1,HIGH);
delay(7000);
digitalWrite(s1,LOW);
digitalWrite(l1,LOW);
delay(500);
digitalWrite(s2,HIGH);
digitalWrite(l2,HIGH);
delay(7000);
digitalWrite(s2,LOW);
digitalWrite(l2,LOW);
}
}
But I need with other button in the nextion pant get out of the cicle... And I can't, because I don't know how listen a button in the nextion, inside sub-rutine of other button.
Please HELP ME!
You really should avoid using delays like that. I usually create counters that go up each cycle and reset when reach a limit to execute something after some time, instead of using delays. You can also have delays without using delays, but instead use the common millis() strategy.
There are many ways to deal with delays without using delays. My suggestion is to do that. I would avoid using while loops too because if they lock in a task, the nextion display could send an event and arduino could miss that for being busy in the while loop.
Now I use "millis()", and I try put a Flag in the "b12pop...." and ejecute the "While" in the "loop" with flag as conditional... I writing now, I hope that all right...
I can't... you have some idea to help me? need ejecute one led sequence with one button, but I need on and off sequence with the same button.
In the nextion, the button is off in the page 1 and on in the page 2
I always use this type of delay:
/*
This is an example of how to put a delay using a counter of cycles.
The counter will increase by 1 each cycle and when the counter reach the desire amount, we can
excecute anything we want, and reset the counter to 0 to start over again.
*/
int countertimer; // Counter to store the amount of cycles that had passed
const int counterAmount = 100; // The amount of cycles to wait
void setup() // Start of setup
{
pinMode(13, OUTPUT); // Stablish pin 13 as output
} // End of setup
void loop() // Start of loop
{
delay(10); // Very small delay, but we don't really need this
if(countertimer > counterAmount) // If counter reach the limit
{
// Put whatever you want to do when counter reach the limit:
if(digitalRead(13) == LOW) // If LED on pin 13 is off
{
digitalWrite(13, HIGH); // Turn the LED on pin 13 on
}
else // If LED on pin 13 is on
{
digitalWrite(13, LOW); // Turn the LED on pin 13 off
}
countertimer = 0; // Reset counter to 0 to start over
}
else // If we didn't reach the limit
{
countertimer++; // Add 1 to counter to keep waiting
}
} // End of loop
thank you very much. very useful! Only comment is about the music, would be better if you remove it.. Otherwise, thank you very much!
I completely agree with you. All videos after this one don't have music. But I don't think there's an option to remove the music of this video after uploaded
Each command that is transmitted to the Nextion serially must be terminated. For this purpose the 3 lines "0xff" are used.You can also output all 3 in one line:
Serial.print ("\xFF\xFF\xFF");
Or like this e.g. "change page":
Create String Variable: String TRM = "\xFF\xFF\xFF" // Terminator for Nextion (globally before setup)
Serial.print ((String("page 2") + TRM)); // Change to page two
For more info:
nextion.tech/instruction-set/
Right at the beginning under 1-1
P.S. don't copy & paste - Read, learn and comprehend :-)
I don’t mind the music……Maybe I can abstract it…or subtract it 😊
Thank you for your feedback. I stopped using music since then. No more complaints and it's easier
Thank you!