No announcement yet.

Serial comunication from Arduino to display uLCD-70-DT

  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    the error it's generic......when i try to upload the message, the error is invalid format.....if i try to update the project with the zip functionality in workshop, the problem it's the same....
    Monday i send an email to the address that you gave me


    • #32
      Hi Doff

      This morning i send to you an email with my project

      Best regard!


      • #33
        Hi Tntsei,

        I have sent back thru email your ViSi project, with comments in it. I think you should use buffered serial comms in your ViSi program. Please note that Arduino uses buffered serial comms in the background. In 4DGL, you have to do it yourself. You have more coding to do, but more control. Please see my previous post about this. The 4D display and the Arduino controller are not synchronized all the time, such that when the Arduino sends "Hello World", the display may not receive the entire string if it's doing something else. The string will have to be buffered. It is best for you to use a logic analyzer and see how your interface works in real time. The other problem - your ViSi project hanging up - I shall investigate on this further.

        Best Regards.


        • #34
          Hi Doff.....

          I read your email and i wanted to thank you for your kindness!!!!

          In any case i finally managed the string with the display!!!!! was sufficent add two delay in the Arduino program!!!!....The other problem was that when i charge the custom font to write the string, the font wasn't able to read the string!......but in any case i solved this problem!!!!!

          I really thank you so mutch!!!

          Best regards


          • #35
            I too have a couple of question concerning serial communication between Arduino and a uLCD-35DT set up as 4DGL. I am interested in sending and receiving serial communication between the display and an arduino when using the display as the master. Can you suggest an example of this type of set-up. I would use Visi-Genie if I could, but because I can't call a visi-genie program from a master program I can't use that method. I will have several different 2 way communications going. One is to display the temp when the sensor is connected to the 35DT. Another is telling the arduino to set different pins high or low, and then getting an indication from the Arduino that its been done. Again, I can do these things using VisiGenie, but I am looking for an example just using Visi and 4DGL.

            Thanks for your help,



            • #36
              You certainly can call a ViSi-Genie program from a master program. You've always been able to do this, the issue was getting Genie to 'exit', so that the master program could get back control. With Genie Magic it is easy to exit Genie, there is a sample called 'ExitGenie'.

              What sort of serial communication are you looking for. It's pretty straight forwards, but if you look inside Serial or Genie it is a bit hard to follow because it is so 'compact/optimised'


              • #37
                Mark, I'll have to look for that genie magic example, I didn't realize that you could call a visi genie program😃 I haven't really sorted everything out but I am using the arduino to manage all the pins and also to monitor temp and ph. The nice thing about visi genie is that it handles all the communication and the event handlers make it simple. I just need to figure out how I want to connect everything, and ask for a few pointers when I get stuck.
                Thank you,



                • #38
                  Mark, I have a question concerning writing strings from a Arduino Host to uLCD-35DT. I can write stings to the display but I want to take an integer variable that keeps a counter and send it along with the string. How can I do this ? I can write to an OBJECT, but this is just a string that is triggered by values received from a temp sensor. So when the temp reaches a certain level, I want to be able to say "The temp reached dangerous levels 3 times".

                  Thanks for your help,



                  • #39
                    Hi Mark,

                    Page 12 of the application note ViSi-Genie Labels, Text, and Strings


                    discusses the difference between predefined and dynamic strings.

                    Page 13 of the application note

                    ViSi-Genie Writing to Genie Objects Using an Arduino Host

                    shows how to write to a predefined strings object.

                    Pages 6 and 7 show how to write to a dynamic strings object.


                    On page 7 it says:

                    Note that for all three examples, the second argument for genie.WriteStr() is a pointer to a null-terminated character array. Section Write String (ASCII) Message of the ViSi-Genie Reference Manual emphasizes this.

                    Since your counter is most likely an integer, you will need to convert it to a null-terminated character array using the function "itoa(...)".

                    To come up with an output such as

                    "The temp reached dangerous levels n times".
                    where n is the changing value of the counter, you will have to correctly join together at least three character arrays. This operation is similar to string concatenation.

                    Attached is a working example.

                    Hope this helps and regards.
                    Attached Files


                    • #40

                      You are Awesome , you answered several questions, I really appreciate the working example. I had read and worked through the String examples and studied the ITOA function, but just couldn't make it all work. Gosh, that's a lot of code space to have a single digit in my message. I may have to rethink my program. Thank you for your help.