Nextion+Arduino Tutorial #2 Sending Data To Arduino

Поділитися
Вставка
  • Опубліковано 19 вер 2017
  • I show a few examples on how you can send data from the Nextion display to the Arduino board and vice versa. This time I use the nextion library, but only to receive data from the display. To send data to the display I still prefer sending it without using the library (like I showed on my 1st tutorial), so this tutorial is a mix of both techniques.
    Note: On the video I said "microseconds", but it's actually milliseconds.
    - Buy the Nextion 3.5" Enhanced: amzn.to/3qMfjTd
    - Buy Arduino nano: amzn.to/2Q4sA5h
    Recommended Tools:
    - Electronic Parts Tester (ESR LCR-T4): amzn.to/2QvQJlP
    - Breadboard (good quality): amzn.to/2QsyY3C
    - Storage Case for Jumper Wire: www.walmart.com/ip/The-Hillma...
    - Multimeter (Fluke 17B+): amzn.to/2L3PNQk
    - Rigol DS1054Z Digital Oscilloscope: amzn.to/2C5ZwD7
    Note: As an Amazon Associate I earn from qualifying purchases.
    Nextion+Arduino Tutorial #1 Beginner's Guide: • Nextion+Arduino Tutori...
    Nextion+Arduino Tutorial #3 RTC and EEPROM (Enhanced Version): • Nextion+Arduino Tutori...
    Nextion+Arduino Tutorial #4 Custom Gauge And Play Video: • Nextion+Arduino Tutori...
    Nextion+Arduino Tutorial #5 Troubleshooting: • Nextion+Arduino Tutori...
    Nextion+Arduino Tutorial #6 A Project From Scratch: • Nextion+Arduino Tutori...
    My example nextion project file #2: drive.google.com/open?id=1srT...
    My example arduino sketch file #2: drive.google.com/open?id=1HjA...
    Nextion library (Original): github.com/itead/ITEADLIB_Ard...
    Nextion library (My copy): drive.google.com/open?id=1e9v...
    Nextion library configuration file for Arduino Uno/Nano: drive.google.com/open?id=1OTg...
    You put this file on the "ITEADLIB_Arduino_Nextion-master" folder, that is on your library folder.
    Quick Start Guide:
    www.itead.cc/wiki/Nextion_Edi...
    Nextion Instruction Set:
    www.itead.cc/wiki/Nextion_Ins...
    nextion.itead.cc/resource/doc...
    FAQ:
    What model is your display?
    It's the 3.5" enhanced version NX4832K035.
    Website: interlinkknight.wixsite.com/i...
    Patreon: / interlinkknight
  • Наука та технологія

КОМЕНТАРІ • 606

  • @beamertech1
    @beamertech1 4 роки тому +1

    I’m remaking the check control display in my 1985 BMW 635CSi to look modern and impressive. I have a lot to do and am currently brainstorming workflow charting all of the processes before designing my screens in CorelDraw. I’ve made a few but it’s super challenging. I’ll be referring to your videos as I complete the build. Keep your videos coming. They’re a HUGE HELP and I’m very grateful.

  • @passelig
    @passelig 4 роки тому +8

    REALLY well made video! I love the effort you have put into making it "to the point" and focusing on the difficult parts

  • @CleancutCampers
    @CleancutCampers 5 років тому

    Thank you so much for this. I've been searching so hard for the information in this video. Keep up the good work.

  • @wonkastudio-johnny
    @wonkastudio-johnny 6 років тому +1

    you are best so far in explaining the nextion displays.thank you for all your hard work and R&D. please make more videos !!

    • @interlinkknight
      @interlinkknight  6 років тому +1

      My pleasure.
      So far the only video about the nextion display that I plan to make is comparing the basic version vs the enhanced. I can't think of any other thing to make a video about that I didn't talk about already.
      Do you have any other idea about more videos about the nextion display?
      I am working on other new videos, but they are not about the nextion display.

  • @emil.mammadov
    @emil.mammadov 4 роки тому +1

    Man you saved my day with that Send Component ID thing. I appreciate you

  • @betoarango1772
    @betoarango1772 6 років тому +4

    This clears up so many questions. Thank you very much for this video as well as the sample sketch.

  • @matzs.5168
    @matzs.5168 6 років тому +2

    Thanks for your Nextion tutorials!! Great Work!

  • @REXONCROSS
    @REXONCROSS 5 років тому +2

    Thanks a lot for your help mate. This is the perfect tutorial for all my questions.

  • @eligijuspranskunas3509
    @eligijuspranskunas3509 4 роки тому +4

    your code inside with explanations is very good and clear, thanks a lot!

  • @leeharrington6438
    @leeharrington6438 6 років тому +10

    This has been a big big help - so many thanks for this!!

    • @interlinkknight
      @interlinkknight  6 років тому

      I am glad. If you have any problem, let me know.

    • @alien4ufo364
      @alien4ufo364 5 років тому

      Hi i'm wondering if this sketch run on your arduino cause when i upload the whole code it messages...
      C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp:203:1: internal compiler error: Segmentation fault
      }
      ^
      Please submit a full bug report,
      with preprocessed source if appropriate.
      See for instructions.
      lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.15.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status
      compilation terminated.
      c:/program files/windowsapps/arduinollc.arduinoide_1.8.15.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed
      collect2.exe: error: ld returned 1 exit status
      exit status 1
      Error compiling for board Arduino/Genuino Mega or Mega 2560.

  • @MyViewsOfCornwall
    @MyViewsOfCornwall 5 років тому +1

    Many thanks, excellent presentation and commented coding. I hadn't figured out there is a PushCallback as I'd based my work on the CompButton example (uses just Pop) so I'd spent a couple of hours wondering why buttons only invoked the Arduino routine on release... So wish UA-cam had suggest your channel sooner before several others. Thank you again.

    • @interlinkknight
      @interlinkknight  5 років тому

      That's great. I love helping. If you have a question about my examples let me know.

  • @becky3505
    @becky3505 6 років тому

    Hiya,
    Thank you for taking the time to post the videos. I have a large RC project that include touch screen to control multiple distances on a single stepper.

    • @interlinkknight
      @interlinkknight  6 років тому

      Sounds nice. Do you have a video showing your project?

  • @ohmedarick1
    @ohmedarick1 4 роки тому +1

    Thank you for your time and effort. Great video!!! Help me understand better the nextion library.

  • @lanfrancosimoncelli3980
    @lanfrancosimoncelli3980 5 років тому

    Finally someone who puts the sketch to help and not just a movie to show that it is cool
    Thank you

    • @omribarkan170
      @omribarkan170 5 років тому

      Hi,
      Can you share the sketch ?

    • @lanfrancosimoncelli3980
      @lanfrancosimoncelli3980 5 років тому

      @@omribarkan170 Hi Omri, My project is opensource, you can find all information in this forum: www.psktrentunisti.it/psk/forum/7-autocostruzione/959-sostituzione-controller-yaesu-con-display-nextion.html?limitstart=0
      The new video is here: ua-cam.com/video/JVZOkg2VBbw/v-deo.html

  • @ivandaniel9535
    @ivandaniel9535 4 роки тому +3

    Thank you for your video, it has opened the door for me with the nextion display. My project is a multi screen EFIS for my Light Sports Aircraft (2 seater). The plan is two 3.5 inch displays and a 7 inch. The micro computer/s are ESP32. Will keep you updated as the system progresses. thanks again

    • @interlinkknight
      @interlinkknight  4 роки тому

      Your project sounds awesome. Yes, please keep me inform about your project. My email is on my channel page

    • @checiui5736
      @checiui5736 2 роки тому

      Salut Ivan, dacă ești disponibil și dispus as vrea să-ți adresez niște întrebări despre cum as putea face un ecran EFIS prin intermediul arduino și nextion, mi se pare foarte interesant și m-ar ajuta foarte mult dacă ai vedea acest mesaj, mulțumesc anticipat!!

  • @NikolayAgopyan
    @NikolayAgopyan 6 років тому

    Thank you for the great tutorial, answered LOTS of questions!

  • @sirthomas2591
    @sirthomas2591 4 роки тому +3

    You were sent from coding heaven. Thanks a million. Now I have a chance. Thats a lot of work you've saved me.

  • @aialik29
    @aialik29 4 роки тому

    You are so right about not using the Nextion library to send to the display. I had everything coded correctly using the library but the Nextion was not responding reliably. So I changed to sending data to Nextion using the plain simple print/write statements like you say to use. When I do that everything works right. Thanks.

  • @sebastianm7894
    @sebastianm7894 5 років тому

    Thank you my friend! You form Beginners to Amateurs.

  • @glynnmason8205
    @glynnmason8205 6 років тому

    I like this display it makes displaying different things easy good video you have done

  • @gr7480
    @gr7480 6 років тому

    Thanks from Spain, good tutorial, very complet.

  • @AndreAnaPena
    @AndreAnaPena 5 років тому

    Just what I was looking for! Thanks so much!!!

  • @claybeard1
    @claybeard1 6 років тому

    very clear explanation, great detail in the arduino file, many thanks for this upload!

  • @marcelomacedo1022
    @marcelomacedo1022 2 роки тому

    Congratulations on the excellent tutorial.

  • @frettedheart
    @frettedheart Рік тому

    Absolutely perfect! Thank you very much for sharing the details of your code.

  • @MrJordinhand
    @MrJordinhand 5 років тому +2

    Thanks for the video, great help!!!!

  • @robertsatoer4668
    @robertsatoer4668 5 років тому

    seriously great vids to get me started. hope I will debug all the typo's before i get sick of it ;)

  • @jarno4054
    @jarno4054 6 років тому

    Very nice video, very good explaned and the instructions are very clear, thanks!

  • @SuperADI2
    @SuperADI2 6 років тому

    You are very good in explaining and presentation I like it, Great job :)

  • @imabozoMeng
    @imabozoMeng 10 місяців тому

    Fantastic video, man! Thank you 👌

  • @jeromedormoy3932
    @jeromedormoy3932 6 років тому

    Thank you ! That was very helpful !

  • @TheOleHermit
    @TheOleHermit 2 роки тому

    Thank you for doing this Nextion tutorial series. I plan to use the Intelligence model as 2 dimensional 'slider' to control X & Y gains of a laser controller. IOW, sliding from bottom left to upper right increases both X & Y. Sliding in a circle changes the symmetry of quadrature waveform pairs or the overall image. Of course, a dot will be required to indicate the current position, as well.
    I've never seen any similar HIDs on any other controllers, but it is much needed in laser controllers to combine two x & y sliders (requiring 2 hands) into a single touch pad (requiring only one finger). There are never enough hands for a single laserist to keep up with a 4 piece band nor orchestra in real time.

    • @interlinkknight
      @interlinkknight  2 роки тому

      That sounds really cool. If you can, post a link of a video showing that project. I would love to see that

    • @TheOleHermit
      @TheOleHermit 2 роки тому +1

      @@interlinkknight Yeah, me too. Lots of R&D ahead, but that's part of the challenge, isn't it? Just hit snag with my Teensy's audio DACs being capacitor coupled, so they filter out DC offests, like beam positions and DC color control. 🤔
      This project could take months to complete, assuming that everything works like it's supposed to.
      Shoot for the stars and wear a parachute, right?😎

    • @interlinkknight
      @interlinkknight  2 роки тому +1

      Totally! Good luck

  • @rishisoni1782
    @rishisoni1782 Рік тому

    This was very helpful.
    Thank you.

  • @deeptibaviskar6456
    @deeptibaviskar6456 3 роки тому +1

    Thank you for the excellent learning video. Helped me a lot.

  • @captainspongeboy
    @captainspongeboy 6 років тому

    You are a superhero! Thank you

  • @elricho72
    @elricho72 6 років тому +1

    Thanks for yours videos !!!

    • @interlinkknight
      @interlinkknight  6 років тому +1

      It makes me happy to help. So, my pleasure.

  • @schneebrett903
    @schneebrett903 3 роки тому +1

    Thanks for the tutorial. It was very helpful. I just needed to figure out why it didn't work. So I ended up downloading a few files with bug fixes by Ray Livingston (NexConfig.h, NexHardware.cpp and Nexhardware.h). But the main culprit in my case was probably the fact that I had Arduino Nano connected to the USB while using the RX0 and TX1 pins for serial communication. After disconnecting the USB and resetting the Arduino it suddenly worked! Before that I always had a get.value error (or time-out after using Livingston's bug fixed files). Now I can use a dual-state button for motor on/off and a slider to regulate RPMs through a motor driver with PWM. Project: I am designing a touch screen MMI for a cosmetic machine.

    • @rachelchow4512
      @rachelchow4512 3 роки тому

      so will you consider to look at touch screen display?

  • @andrewpepper1
    @andrewpepper1 6 років тому

    Thanks Thanks Thanks !!! Fantastic clear simple step by step explanation again Thanks

  • @charlesfernands
    @charlesfernands 3 роки тому +1

    thank you very very very much bro!!!!
    your video saved me!

  • @Electromaniaworld
    @Electromaniaworld 6 років тому

    sorry for non tech question, what software do you use for pc screen capture, i liked it when it zooms IN when you click at certain place on screen.

    • @interlinkknight
      @interlinkknight  6 років тому

      I use nvidia shadowplay that it's included on GeForce Experience but the zoom is not made by the screen capture. I zoom manually using my video editor (Sony Vegas) much after I record/capture everything.

  • @atmk
    @atmk 6 років тому

    super helpful, Thank you

  • @anh6790
    @anh6790 5 років тому

    Great! Thanks for sharing to the world @@!

  • @cedricbron7472
    @cedricbron7472 5 років тому

    Thanks a lot...amazing job...

  • @renatocanhaify
    @renatocanhaify 5 років тому

    Thanks for your work. I have a question: is it possible to make an xy plot with online data from arduinto. Let me explain: I am buiding an potensiostat, a devide which imposes a triangular potential ramp perturbation o an electrochemical system (batery for example) and record the current flowing between electrodes. I need to plot current in y axis and potential on x axis. Thank you.

    • @interlinkknight
      @interlinkknight  5 років тому

      The nextion display does support wave form that is similar to a xy plot. Is it enough? There's no native way to have a xy plot, but I imagine it could be done with some tricks and hard work. You know, maybe creating a matrix of square images and control each one as pixels. But not easy.
      If all you need is a simple xy plot, a conventional display would be better because you can control the pixels more directly and that way you have more freedom. The nexiton display is more for complex stuff that can't be done by arduino directly.

  • @patrickvalk
    @patrickvalk 5 років тому

    Amazing sound improvement !!

    • @interlinkknight
      @interlinkknight  5 років тому +1

      Thanks. Yeah, I got a new mic.

    • @patrickvalk
      @patrickvalk 5 років тому

      @@interlinkknight really liked your videos, but with the new mic it's just so much better :)

  • @drakkorvladimir4012
    @drakkorvladimir4012 5 років тому

    Awesome! Thank You.

  • @jamescullins2709
    @jamescullins2709 6 років тому

    very interesting video, I have learned a lot form it.

  • @wonkastudio-johnny
    @wonkastudio-johnny 6 років тому

    also would like to know, can you only write to the page that is currently displaying? if you write data to a non displayed page , will data be retained ?

    • @interlinkknight
      @interlinkknight  6 років тому

      The only object that it can receive data without being on the current page is the global variable, at least that I can think of. All the rest have to be on the current page. But why do you care about sending data to objects in other pages? What is the thing that you are trying to do?

  • @RoMecha_lb
    @RoMecha_lb 3 роки тому

    hello again , i have one more question ,
    if i want to read multiple texts from the nextion display, i cannot read more than one text , i tried multiple things like create a new character "char buzzer2" for example , it only gives me on arduino monitor one text(buzzer or buzzer1) only,
    do you have any suggestion that can help me sir
    Thank you

  • @althuelectronics5158
    @althuelectronics5158 4 роки тому

    After editing and looking to upload, on the Adino board but not upload error.
    Please helping sir

  • @stevekimanthi9582
    @stevekimanthi9582 6 років тому

    Hi, is it possible to change the state of a dual state button on the display with an external dual state button connected to the arduino? I want to control a light with both buttons so when i physically press the button connected to the arduino the button on the nextion should go to the same state as the physical button.

    • @interlinkknight
      @interlinkknight  6 років тому

      Of course you can. Just send the value to the button like anything else. Example: bt0.val=1 to press or bt0.val=0 to release. Obviously send also the 3 finishing lines as always. See my examples.

  • @twin331000
    @twin331000 5 років тому

    Hi I tred your example, but i got an error on :
    nexLoop(nex_listen_list);
    exit status 1
    expected constructor, destructor, or type conversion before '(' token
    can you tell whats wrong

    • @interlinkknight
      @interlinkknight  5 років тому

      I never seen that error. Watch my troubleshooting video.

  • @THECAPTAIN-ev7bj
    @THECAPTAIN-ev7bj 4 роки тому

    Best tutorial

  • @bobpaydar
    @bobpaydar 3 роки тому +1

    thanks for very good tutorial 👍🏻🌹

    • @rachelchow4512
      @rachelchow4512 3 роки тому

      Hi bob will you consider to use some other brand touchscreen display?

  • @eduardoantunes7374
    @eduardoantunes7374 4 роки тому

    Hello, I have one, and as I can se it's use serial comunication, did tou declare de pins for the comunication on Arduino ? I didn't see this on your code.

    • @interlinkknight
      @interlinkknight  4 роки тому

      In arduino uno and nano there's only one serial port. Nothing to declare there

  • @naveenshetty2891
    @naveenshetty2891 6 років тому

    Instead of putting the code bauds=115200 in arduino code , can i have it set as a pre-initialization in nextion

  • @MRgamer-gg6in
    @MRgamer-gg6in Місяць тому

    Thanks Really Helped

  • @atngo5599
    @atngo5599 6 років тому

    I bought a HMI China. I couldn't use CallBack function in Nextion library. Dosen't it support for this HMI display? Thank for your attention!

    • @interlinkknight
      @interlinkknight  6 років тому

      I am not sure what kind of display you bought but this tutorial is for the nextion display only.

  • @TheFlybyman
    @TheFlybyman 5 років тому

    Will you make more videos about this ? Ill like to control some neopixel, and make pattons and color, when push bottons. And i can get it to work :)

    • @interlinkknight
      @interlinkknight  5 років тому

      I feel that I already showed everything relevant to show about the nextion display.

  • @McuPro
    @McuPro 4 роки тому

    Thank you very much.

  • @razvandinica7705
    @razvandinica7705 6 років тому

    Thanks for the great videos. Very clear to understand how to comunicate with Nextion displays. I still have an issue with getting data from the display. Not receiving the value with the get command. I am using software serial on Arduino Pro Mini " SoftwareSerial HMISerial(2,3) ". The receiving variable remains zero ( or the value what is given on the initialization ). Any ideea why this is happening ?

    • @interlinkknight
      @interlinkknight  6 років тому

      I tested software serial with the nextion display too and I got problems receiving data too. Solution: don't use software serial, unless is to only send data to the display.

  • @superisaac3303
    @superisaac3303 2 роки тому

    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?

  • @igeorge688
    @igeorge688 6 років тому

    What is the tiny Arduino you use on the video, part number and where to buy.
    Thank you

    • @interlinkknight
      @interlinkknight  6 років тому

      It's called arduino nano. It's very common. It uses the same code as arduino uno. I like it because is small, can be plugged into a breadboard and it's super cheap from china (US $3). I buy them on ebay, usually 10pcs at a time

  • @DanielG0922
    @DanielG0922 6 років тому

    Thanks a bunch!

  • @idoumlatifa8520
    @idoumlatifa8520 5 років тому +1

    hi thanks for your video it's really helpfull. I didn't anderstand why we have to use 0xff to show messages in nextion.
    Thanks again for the video and for help

    • @interlinkknight
      @interlinkknight  5 років тому +1

      I am glad you like it. Those 3 lines of "0xff" basically tells the display that is the end of the command. That's why you need it.

  • @sanches2
    @sanches2 2 роки тому

    Thank you!

  • @alien4ufo364
    @alien4ufo364 5 років тому +1

    some sources write the library like this #include "nextion.h" instead of
    or
    NexDSButton bt0 = NexDSButton(0, 2, "bt0"); what is DS?

    • @interlinkknight
      @interlinkknight  5 років тому

      DS = Double State. It's one type of button in nextion when you press is ON and when you press again is OFF.
      The "nextion.h" vs doesn't matter.
      I can only help you if you stay focus on my examples. If you get information for any other source, I have no idea what you are doing so no way I can help you. And if you need to write and write a lot, better send me an email.

    • @alien4ufo364
      @alien4ufo364 5 років тому

      Yes Please i'll appreciate if you give me your Email address...

  • @mrk2028
    @mrk2028 Рік тому

    Thank for your video. I think there is a problem with "nexLoop(nex_listen_list); // Check for any touch event". popmenus does not work or never. ..

  • @adeekhan3463
    @adeekhan3463 6 років тому

    Brother i am using Nextion to send command to arduino to run the stepper and control relays. i have buttons for their control... do i have to mention all pages in arduino code??? because i have done everything mentioned in your code except mentioning pages.... will be really thankful if you help

    • @interlinkknight
      @interlinkknight  6 років тому

      As I mentioned on the video, I let arduino know what page the display is on to avoid arduino sending data to non-existing objects. If you are not sending data to the display, then you don't need this. If you do send data to the display, then you might notes some slowdown on the arduino loop because the display would be sending a constant error message. The problem is that if you send data to the display and that object doesn't exist on the current page, the display will send an error message and arduino will listen to that. This slows down the loop and will create some lag.

  • @turbo2ltr
    @turbo2ltr 4 роки тому

    I want to make a quad state button. I put the code in to rotate through the 4 different images. Is there a way to send back the PICC of an button? Knowing that it was pressed doesn't do me any good if I don't know what image it's currently showing.

    • @interlinkknight
      @interlinkknight  4 роки тому

      You can't know directly, but you could do it storing the state of the button in a variable inside the nextion display. You can later read that variable from arduino.

    • @turbo2ltr
      @turbo2ltr 4 роки тому

      @@interlinkknight Thank you! I assume I can instead just have a regular button (or crop?) have it send the touch event and let the microcontroller manage the button state and push the correct picc for the crop area back to the display correct? I don't want to have to poll for changes.

    • @interlinkknight
      @interlinkknight  4 роки тому

      Yeah, that's even better. Let arduino keep the state of the button and you just change the picture with arduino

  • @ghassenb2492
    @ghassenb2492 5 років тому

    thank you!

  • @simplyishan06
    @simplyishan06 3 роки тому

    I have a text box where i punch in text on display using the alphanumeric keypad... When i press OK on that keypad, i wish to receive that text to my arduino mega rather than using a separate button to transmit that text...
    Could you help me with that?

    • @interlinkknight
      @interlinkknight  3 роки тому

      I don't understand. Just make the OK button to send the text, like in my example

  • @muralisubramaniam5622
    @muralisubramaniam5622 4 роки тому

    LIke Thomas said.. you were sent by coding heaven. I do have some problems though when I interface with STM32 nucleo. Working on it...:)

  • @omribarkan170
    @omribarkan170 5 років тому

    Hi,
    First, I want to thank you for your very nice and clear example.
    It taught me a lot of things.
    And second, I have a few quetions:
    1. In your example, you've changed the value in page 2, box "n0" between 0 and 1, by pushing butten "c0" (number3) but I didn't see where do you change the value of "number3".
    2. How can I use softwareSerial in this example ("SoftwareSerial HMISerial(10, 11);" ?
    3. If I want to play with this example, and follow the values, how can I do this, or in different words, how can I debug the sketch?
    4. Where can I find the command list for Nextion, like " c0.getValue(&number3)", "Serial.print(number3)".......etc.
    Thanks,
    Omri

    • @interlinkknight
      @interlinkknight  5 років тому

      I am glad you like the video.
      To answer your questions:
      1. In page2 object n0 is showing the page number between 1 and 3. That's sent by arduino.
      2. I don't recommend using software serial with the nextion library. It doesn't work well. The only way the software serial works with the nextion display is if you want to only send data to the display, and you can do it normally as you would with any other serial device.
      3. I don't understand the question.
      4. I don't understand the question.

  • @ser7ser7i
    @ser7ser7i 3 роки тому +1

    Thank you

  • @przemek_kw
    @przemek_kw Рік тому

    Hi, I want to go into Arduino with nexrion display in my very first project, is it possible to connect this display with Arduino on much longer wires, ex 4-5 meters? Can I use for that shielded twisted pair wire? Will it work?

    • @interlinkknight
      @interlinkknight  Рік тому

      I don't know, but I think it should work. Try it out and let me know

  • @joescopo8933
    @joescopo8933 4 роки тому

    Can I use software serial 2,3 on the Nano with the nextion, instead of the hardware serial 0,1?

    • @interlinkknight
      @interlinkknight  4 роки тому

      Works for sending data from arduino to the display, but doesn't work well when receiving data from the display

  • @drawingboard82
    @drawingboard82 6 років тому

    Thanks very much, you are a godsend. I like the display but there is so little useful information on how to use it. I am using mine as a display for an electric outboard motor for a small boat.

    • @interlinkknight
      @interlinkknight  6 років тому

      I am glad I could help. If you have a video or pictures of your project, leave the links here.

  • @thenderick7434
    @thenderick7434 2 роки тому

    I tried to use your same program of arduino and nextion on my display and i can receive information but i cant send information to arduino, do you have any idea of what is this happening?

  • @georgbrunhuber2329
    @georgbrunhuber2329 5 років тому

    Hello, maybe you can help me.
    I want to build a small filling station. It stumbled on deas Nextion Display that pleases with a lot. Is this possible with an Arduion Uno HX711 and a stepper motor. How should I tackle the project am new to the field but know something about programming. Maybe you can help me there.
    mfg George

  • @stahelpeter
    @stahelpeter 6 років тому

    Hello, many thanks for your video and helped me a lot. I try to to identify the button / dual state button which is pressed on the display and use the getValue function. I get this error "MySensorNextion:254: error: 'class NexButton' has no member named 'getValue'
    bt0.getValue(&number1);". Any idea what the issue could be?

    • @interlinkknight
      @interlinkknight  6 років тому

      I see the problem. In the first main section where we declare the objects you put NexButton instead of NexDSButton. NexButton is for normal buttons and you are trying to read a dual state button. Dual state buttons are called NexDSButton in this section.

    • @stahelpeter
      @stahelpeter 6 років тому

      Thank you for the reply I know now what to do :-). I use the github.com/itead/ITEADLIB_Arduino_Nextion/archive/v0.7.0.zip library which does not include the DS button .h file. Are you working with the github.com/itead/ITEADLIB_Arduino_Nextion/archive/master.zip. libraray? (which das the DS button .h file)

    • @interlinkknight
      @interlinkknight  6 років тому

      The link for the library I used is on the description

  • @mucasa
    @mucasa 4 роки тому

    Dear,
    Can you help me again?
    I have "Number BOX" with Number Keypad in the Nextion. I need to get the value to a "int" in arduino... Do you know ? Tks a lot.

  • @lanfrancosimoncelli3980
    @lanfrancosimoncelli3980 6 років тому

    Thanks very much......

  • @manuelrodriguezlatorre8978
    @manuelrodriguezlatorre8978 Рік тому

    Hello, I am communicating a s71200 with a nextion screen through a CM1241 RS232 module and a max3232 to convert RS232 to ttl. I have already managed to receive in the plc by pressing buttons created on the screen and numbers as well, with which I have achieved the reception part. However, when trying to send from the s71200 plc to the screen so that it shows me a numerical value in a field, I cannot get it to send and it does nothing, the Tx led on the CM1241 RS232 only blinks, so something is sending but it is not what correct. I have looked for information about all this in the instruction set but I can't find where I think the problem is, which is in the character frame. Does the display need a frame of characters or bytes to know or start receiving? I am trying to send in hexadecimal.

    • @interlinkknight
      @interlinkknight  Рік тому

      First I suggest trying to run my example files in my first tutorial using an Arduino nano or uno. Don't do anything else until you have that working

  • @eligijuspranskunas3509
    @eligijuspranskunas3509 4 роки тому

    Hi, great tutorial, but I'm stuck on my project, How to send variable from Nextion to arduino bigger than 255?
    for ex.:
    variable1.val=450 i need to get that number in to my arduino sketch (int var1) variable.

  • @naveenshetty2891
    @naveenshetty2891 6 років тому

    Hi ,
    in the code u had mentioned that u can change the baude rate to 115200 , ( bauds = 115200) , but with this change my nextion and nodemcu does not communicate ( led set at D5 ), when i change it back to 9600 it does communicate properly , does bauds code work with the regular 2.8 board.

    • @interlinkknight
      @interlinkknight  6 років тому

      It works with any display version. Did you change anything on my code? Did you cycle power OFF and ON both devices? The display has to receive the command to change the baud rate using the baud 9600. That's why I start the serial communication at 9600 and later give the instruction "bauds=115200" and after that end serial communication and start another serial in 115200. And power off the arduino so executes the setup.

    • @naveenshetty2891
      @naveenshetty2891 6 років тому

      HI
      i did the following in the setup
      void setup() { // Put your setup code here, to run once:
      Serial.begin(9600); // Start serial comunication at baud=9600
      delay(500); // This dalay is just in case the nextion display didn't start yet, to be sure it will receive the following command.
      Serial.print("bauds=115200"); // Set new baud rate of nextion to 115200, but it's temporal. Next time nextion is power on,
      Serial.write(0xff);Serial.write(0xff);Serial.write(0xff);
      Serial.end(); // End the serial comunication of baud=9600
      Serial.begin(115200); // Start serial comunication at baud=115200
      bt0.attachPop(bt0PopCallback); // Dual state button bt0 release
      pinMode(D5,OUTPUT);
      }
      then i disconnect the nodemcu from the pc and connect it to a power bank and connected the tx and rx to nextion, then i click the dual mode , it does not work , then i comment the code for baude change and again reload the code and then it works.

    • @interlinkknight
      @interlinkknight  6 років тому

      By putting "bauds" instead of "baud" you are trying to change the default baud rate of the display, meaning it will have that by default. Try removing the "s" so you change the current baud rate instead of default to see if works.

  • @marvg7062
    @marvg7062 4 роки тому

    This is incredibly helpful, for some reason my slider is only sending the PWM value on Release even though I added the line of code printh 65 00 04 00 FF FF FF on the Touch Move.. any idea what I could do to get the brightness of my LED smooth instead of only refreshing after I release the touchscreen?

    • @interlinkknight
      @interlinkknight  4 роки тому

      My only suggestion is to try my example and compare it with your code so you can see what you did differently

  • @korbano
    @korbano 5 років тому +1

    I have a textbox on the Nextion and I need to get the value of the textbox as a String on the Arduino. It looks like the code for this video uses:
    memset(buffer, 0, sizeof(buffer));
    t0.getText(buffer, sizeof(buffer));
    But when I do Serial.println(buffer); it prints out [1296:1,14,b11]
    recvRetString[0,]
    How do I get it to print the value of the textbox?

    • @interlinkknight
      @interlinkknight  5 років тому

      I already show how to do what you asked in minute 8:50

    • @korbano
      @korbano 5 років тому

      @@interlinkknight that shows how to get the text to the arduino and then back onto the nextion, but I was looking for how to get that text into an integer on the nextion. The following worked:
      String inString = buffer;
      number = inString.toInt();

    • @interlinkknight
      @interlinkknight  5 років тому

      Oh. Good to know.

  • @andpanca2759
    @andpanca2759 4 роки тому

    why can't I run the getText function?
    even though other functions can be executed, do you have a solution?

    • @rachelchow4512
      @rachelchow4512 3 роки тому

      will you consider to look at other brand touchscreen display?

  • @yazani19
    @yazani19 2 роки тому

    Hello Thanks for you Tutorial
    i have this error can you help Please:
    exit status 1
    'NexButton' does not name a type; did you mean 'Nextion'?
    Thanks in advance

  • @imextradeco.6689
    @imextradeco.6689 4 роки тому

    Is it possible to display the value of the pressed button in the text box placed on the second page by pressing the button (the value is 10) on the first page with only NEXTION TFT?

    • @interlinkknight
      @interlinkknight  4 роки тому

      Yeah. Make a global variable and store the value there. You can access the data on any page

    • @imextradeco.6689
      @imextradeco.6689 4 роки тому

      @@interlinkknight Thank you for the quick response. Do you know any instructive web page for Nextion TFT? I am very new to TFT and Arduino. I use Nextion Editor, but I do not know any commands, how to set up each compornents with the command. I just want to do press button, then the value is handled to the next page, then on the next page, the value stored to EEPROM by pressing the some button. I am sorry for my English, because English is my second language.

    • @interlinkknight
      @interlinkknight  4 роки тому

      ITEAD have websites with all the commands. I show a lot of the basic stuff on my tutorials. Just watch all of my videos about the nextion display and try all my examples. I think everything you need is already there

    • @imextradeco.6689
      @imextradeco.6689 4 роки тому

      @@interlinkknight Thank you for the advive.

  • @edgaromarreynatorres3940
    @edgaromarreynatorres3940 6 років тому

    I have an arduino genuino uno
    This code works with?

  • @user-xm5gy8tp9y
    @user-xm5gy8tp9y 4 роки тому

    Thank you for good example. But i have a problem. I wonder why i coudn't use getText or getValue function. My nextion library is ITEADLIB_Arduino_Nextion-0.7.0. I changed library version but it didn't work. If you know how to get it work, could you tell me what i have to do?

    • @interlinkknight
      @interlinkknight  4 роки тому

      You tried my example, right? Are saying that my example works except the text?

  • @mrk2028
    @mrk2028 Рік тому

    I could not simulate in proteus and nextion and virtual comm and ardunio... nextion sends data but ardunio can not send any dat to nexiton. Ithink pop push sub programs ca not be triggered by nexLoop (....) etc.

  • @jarosawmarek887
    @jarosawmarek887 3 роки тому

    Is there a way to not to use buttons next/back but slide pages with a finger ??

    • @interlinkknight
      @interlinkknight  3 роки тому

      I guess you could use a slider and write the code to change page with that, but honestly I prefer buttons for that since it uses resistive touch screen. There are models that are capacitive touch screen that might work better with that. Either way, it would not animate the pages like you think (side to side). It would load each page instantly without animation.

  • @yapandasoftware
    @yapandasoftware 5 років тому

    If a person wants to not use the RX, TX pins to input the values because the RX and TX are in use transmitting I/O then can we use another set of pins and create a serial alternate say on Pin 10 and 11? If so what is the proper syntax to set up the serial connections for these pins and translate the I/O from the Nextion Display to the RX. TX pins for wireless transport to a remote receiver interface?

    • @interlinkknight
      @interlinkknight  5 років тому

      In that case I would use an arduino mega that has 3 serial ports

    • @yapandasoftware
      @yapandasoftware 5 років тому

      @@interlinkknight I would but I'm in production design phase using the Arduino Nano or I can use the Arduino Micro. I used the Mega during my test phase and it works fine. But the touch screens have to be placed in an enclosure and I have to design the 3D CAD files for the Arduino board with 1 relay output and 1 limit switch. It uses RS485 transmitters to transmit data from the Arduino RS232 converter to a remote Master controller which is written in C# interface with a database. There are as many as 120 touch screens in the system acting as slaves but they all have to coordinate their actions through the master controller. For this reason I need to either create a dual Serial I/O or if it's possible just allow the Arduino to listen to both the RS485 I/o and RS232 from Nextion at the same time and just use DTR to control the data flow. I didn't want it to get this complicated...

    • @interlinkknight
      @interlinkknight  5 років тому

      Wow. Well, all I know is that you can send data to the nextion display with software serial, but receiving data doesn't work reliably.

    • @yapandasoftware
      @yapandasoftware 5 років тому

      @@interlinkknight Actually I learned you can simply connect TX of the screen to the RX of the Arduino and RX of the screen to the TX of the Arduino and connect the TX of the screen to the TX of the Transmitter and RX of the Screen to the RX of the transmitter and the transmitter will only listen to I/0 of the Arduino. So I CAD it in already and wrote the firmware using SMARTLINX. I hope I'm right. Just sent the Gerbers off to China for some protoboards.

  • @motti9000
    @motti9000 6 років тому

    HI,
    I use arduino mega which have 3 tx/rx port - none of them load arduino sketch to the nextion....I replace to uno it load te sketch but only when yelow line
    at nextion connect to pin 0 rx and the blue connect to pin 1 ???Do you know whay??

    • @interlinkknight
      @interlinkknight  6 років тому

      Why works on arduino uno and not on mega? Because the serial name on arduino mega has a number, and arduino uno/nano is just called "Serial". Replace everything that say "Serial" with "Serial1" and it should work. Obviously connect the display to the pins for serial1 (TX and RX)

    • @motti9000
      @motti9000 6 років тому

      Where to change?
      At the softwarserial lib?

    • @interlinkknight
      @interlinkknight  6 років тому

      Software serial? No-one here is using/talking about software serial. You change it on the sketch.

  • @wenzhuoyili4781
    @wenzhuoyili4781 5 років тому

    does the programme work with Arduino UNO? or is it for Arduino Nano only?

    • @interlinkknight
      @interlinkknight  5 років тому

      Arduino nano = arduino uno. Same program, same pins, same everything.

  • @perksflo
    @perksflo 2 роки тому

    Val numbers are sent easily although having some issues with send texts. Arduino Isn't letting me double quote to let me send txt over to the display? Any Advice?

    • @interlinkknight
      @interlinkknight  2 роки тому +1

      Watch the troubleshooting video

    • @Dvance
      @Dvance 2 роки тому

      @@interlinkknight Where can we find that?

  • @elricho72
    @elricho72 6 років тому

    I have problems when i change the page if in the page is the same variable even though i check the current page sometimes work fine sometimes don't. I put the same code in my application printh 65 01 00 01 FF FF FF // [65] [PAGE_NUMBER] [00] [01] [FF] [FF] [FF]
    changing de page 00 01 02 in every case and check de page in my arduino code, but don't always work. Could you make something else?
    Other thing is i have a dual button and in the screen change well, but arduino is like sometimes like lose the data, because not respond always, is normal that?

    • @interlinkknight
      @interlinkknight  6 років тому +1

      I am not sure I understand. I would have to check the sketch and nextion project to better understand the problem. But all that you mention appears to me as a problem in communication from the display to arduino. In my tests I never seen that, in normal situations. I can provoque communication problems using software serial, causing errors messages from the display, etc. But in normal situations, I never seen that level of inconsistency.
      My example files work well for you, right?
      Send me an email with the files and more details about the problem. My email address is the same as my youtube channel name at gmail.com