#101

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 เม.ย. 2020
  • This video is the 4th in a series showing to transfer float values from the Arduino to the Nextion. In this example, I transfer a sudo-float value from the Nextion to the Arduino reconfigure it and send it back to the Nextion
    If you enjoy the content considering donating a cup of coffee at ko-fi.com/cheapcontrols
    You can sort and find videos better on at www.cheapcontrols.com
    I have started a group on Facebook to make it easier to interact with user-requested videos. Consider looking it up. pg/cheapcont...

ความคิดเห็น • 45

  • @awshick7949
    @awshick7949 2 ปีที่แล้ว +1

    Awesome! I've made a keypad for entering a set of numbers to run some steppers. Really wanted to be able to include decimal points, but was unable to figure it out. This is exactly what I needed. I just started playing with the nextion screens and your channel has been an invaluable resource. Thanks so much.

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      I am glad I can help. I am on a break but will back to making tutorial videos in a month or two. Thanks for watching.

  • @rafaelesparza7467
    @rafaelesparza7467 4 ปีที่แล้ว +2

    Thank you very much, your videos are very good, they have a lot of quality!
    How can I use this variable on the arduino?
    for example:
    If I received a 1.1 from the nextion screen and wanted to save the value for later use in an if like this: "if (value == 1.1) {
    digitalWrite (12,1);} "

    • @CheapControls
      @CheapControls  4 ปีที่แล้ว

      I would think you could use it similar to your example. Do you think it would be useful to make a follow up video with a practical example?

    • @rafaelesparza7467
      @rafaelesparza7467 4 ปีที่แล้ว

      @@CheapControls
      Yes, that would be very illustrative, I understand the general idea of ​​how to read and that opened many doors for other types of code. But I would like to see how you do it, your codes are much cleaner, and professional!

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      I was looking through some older comments and was wondering if I ever made a video that assisted you with this. I usually reply when I put out the video but I did not respond to you and I never want to leave people without a reply. I apologize if I was not able to assist you.

  • @marcelomacedo1022
    @marcelomacedo1022 2 ปีที่แล้ว

    Congratulations on the excellent tutorial! What changes must be made to the code in order for it to run on ESP8266?

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      I am not that familiar with the ESP8266. I have played with it and I believe it has a Serial Port. I would think the only change would be in the configuration of that portion. Thank you for watching and have a wonderful day.

  • @makerfactory8544
    @makerfactory8544 3 ปีที่แล้ว

    Hi Thank you for the great video content you provide. I need a way to change the text in t0.txt from Standby to Running from Arduino to Nextion, could you show me an example. Thank you

    • @makerfactory8544
      @makerfactory8544 3 ปีที่แล้ว

      Also it would be great to be able to change this on multiple pages (a status bar on top, on all pages)

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      Watch this video and let me know if it helps. th-cam.com/video/tQTrgLgYsZI/w-d-xo.html

  • @temelcakr2945
    @temelcakr2945 3 ปีที่แล้ว

    Very thanks

  • @zeptohassan6928
    @zeptohassan6928 2 ปีที่แล้ว +1

    How will I send multiple float values(x1.val, x2.val, x3.val) from a single page by clicking a single button?

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว +1

      I will try and help through your Email request.

  • @Huw77
    @Huw77 3 ปีที่แล้ว

    Does this method work with multiple float values on the same page?

    • @CheapControls
      @CheapControls  3 ปีที่แล้ว

      You could but you would have to have a unique identifier for each box. float1 and float2 or something like that and then check for that unique identifier in the Arduino.

  • @zeptohassan6928
    @zeptohassan6928 2 ปีที่แล้ว

    Hi there, thanks a lot for the video. I have got one error while compiling. i.e. error invalid:Variables:send_value.txt
    for send_value.txt="float"
    send_value.txt+=decimal.txt
    send_value.txt+=value.txt
    print send_value.txt

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      do you have the for line for(send_value.txt=="float") -- note the double equals sign

    • @zeptohassan6928
      @zeptohassan6928 2 ปีที่แล้ว

      @@CheapControls sorry for the typing mistake. I'm not using for
      i have tried double equals to, but same error i'm getting i.e. Error:Invalid Variables:
      send_value.txt (double click to jump to code)
      send_value.txt(double click to jump to code)
      send_value.txt(double click to jump to code)
      send_value.txt(double click to jump to code)

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      I am still not following. If you go to cheap controls you can submit this as a comment and I will Email yo back then you can submit your code for review. If I see the HMI file it might help me follow you better. Sorry for following your request better.

    • @ared7909
      @ared7909 ปีที่แล้ว

      @@zeptohassan6928 Check if your variables are declared as string

  • @benoitturcotte6800
    @benoitturcotte6800 2 ปีที่แล้ว

    at 8:30 you say note there is a cast to float. What does it mean ?

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว +1

      Before I answer that do you know the difference between a float and an integer. Sorry to ask but my answer will be different depending on if you know the difference or not.

    • @benoitturcotte6800
      @benoitturcotte6800 2 ปีที่แล้ว

      @@CheapControls I think a float have decimal and intger have not. Im french so i try to translate what was a '"cast" but never got an answer. :) thank for reply !

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว +1

      I was waiting for your reply. to cast is to take a value, in this case an integer. If you want to keep it an integer for the code but for a single calculation you want to turn it into a float you can "cast" it. lets say you make x an integer. x = 10. Then x/4 would be equal to 2 instead of 2.5 but if you cast it like this float(x)/2 would temporarily turn it into a float just for this line of code.

  • @eswtmarket
    @eswtmarket 2 ปีที่แล้ว

    if there isnt come float, else { data_from_display="" } ??

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      I am sorry but I do not understand that comment. Will you please try to re-phrase?

  • @user-xd5ku4xk2v
    @user-xd5ku4xk2v 2 ปีที่แล้ว

    Hello, can the source code be shared? thanks

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      If you want source code you have to go to www.cheapcontrols.com and fill out the comment form. List the video number if you want the Arduino code or the Nextion code or both. Thank you for watching.

    • @user-xd5ku4xk2v
      @user-xd5ku4xk2v 2 ปีที่แล้ว

      @@CheapControls I have made a comment, thank you for your wealth, the problem I am currently encountering is the conversion between ieee754 floating point numbers and four-byte hexadecimal numbers. Can you do a video to give pointers, thank you

    • @CheapControls
      @CheapControls  2 ปีที่แล้ว

      Check out this video and see if it helps th-cam.com/video/MhjV6xppNBU/w-d-xo.html

  • @user-ud1rl8ln1k
    @user-ud1rl8ln1k ปีที่แล้ว +1

    cov x0.val,value.txt,0
    cov x0.vvs1,decimal.txt,0
    send_value.txt="float"
    send_value+=decimal.txt
    send_value+=value.txt
    print send_value.txt
    Why i get those errors?
    Error:Invalid Variables:send_value( Double click to jump to code)
    Error:Invalid Variables:send_value( Double click to jump to code)
    Error:Compile failed! 2 Errors, 0 Warnings,

    • @CheapControls
      @CheapControls  ปีที่แล้ว

      cov x0.val,value.txt,0
      cov x0.vvs1,decimal.txt,0
      send_value.txt="float"
      send_value.txt+=decimal.txt// you need the ".txt"
      send_value.txt+=value.txt// you need the ".txt"
      print send_value.txt// I would also not use print but prints sendvalue.txt,0
      I do not have the editor with me but I think mhy changes above are correct. I leave the .txt off all the time.

    • @user-ud1rl8ln1k
      @user-ud1rl8ln1k ปีที่แล้ว

      @@CheapControls I was reading the code for more than half hour i couldn't see that the .txt was missing. Thank you very much.

    • @CheapControls
      @CheapControls  ปีที่แล้ว +1

      I am glad I was able to help. I have done the same. Spent hours because I forgot a comma or a semi-colon. It can be frustrating.

    • @user-ud1rl8ln1k
      @user-ud1rl8ln1k ปีที่แล้ว

      @@CheapControls Everything looks ok but if i change the value more than 2-3 times i get this at Serial monitor. And
      19:44:21.457 -> DIVISOR - 100 Value = 45.85float2588
      19:44:36.827 -> DIVISOR - 100 Value = 5.88f⸮oat2300
      19:45:27.421 -> f⸮oat2300float2300
      19:45:38.277 -> f⸮oat2300float2300f⸮oat2330
      19:48:00.612 -> f⸮oat2300float2300f⸮oat2330fl⸮at2530
      19:48:38.754 -> f⸮oat2300float2300f⸮oat2330fl⸮at2530float2530

    • @CheapControls
      @CheapControls  ปีที่แล้ว

      It looks like it is getting appended with clearing