Announcement

Collapse
No announcement yet.

genie.WriteObject(GENIE_OBJ_STRINGS, 0x00, "toto");

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • genie.WriteObject(GENIE_OBJ_STRINGS, 0x00, "toto");

    I would like to write to a string object on form0 and I have difficulties with that.
    My "application" is very basic. I have just a trackbar and I am reacting to its changes by modifying a string on the form.
    I can catch the event for sure, because I make the LED (13) blinking at the same time and that works. But no change to the text itself.
    Code:
    genie.WriteObject(GENIE_OBJ_STRINGS, 0x00, "toto");
    for(int i = 0; i < 10; i++) { digitalWrite(LED, LOW); delay(100); digitalWrite(LED, HIGH); delay(100);}
    Any advice?

  • #2
    Hi Mohamed,

    genie.WriteObject() expects an integer for the last parameter.

    You could try creating the string object in Visi Genie with the text "toto" then,

    genie.WriteObject(GENIE_OBJ_STRINGS, 0x00, 0x00); // Strings0 Message 0 I Hope this helps Paul

    Comment


    • #3
      Hi Pauleilio

      Many thanks for the feedback.
      In my configuration I can't do what you are proposing. The reason is that I would like to display an IP address I received from the connected to access point and this is an information I don't know during Visi Genie design.
      I think I have to create a string in my sketch, then display it a run time.
      Is my way of thinking correct?

      Thanks

      Comment


      • #4
        Hi Mohamed,

        Yes, my apologies, it is data from the arduino you want to send to the display so your way of thinking is correct.

        I will try something here and get back to you.

        Thanks

        Paul

        Comment


        • #5
          Hi Mohamed,

          Writing strings is explained on page 6 http://www.4dsystems.com.au/download...0018_R_1_0.pdf

          I hope this helps.

          thanks

          Paul

          Comment


          • #6
            you should be using genie.WriteStr,
            try this:

            Code:
             
             genie.WriteStr(0, "toto");

            Comment


            • #7
              Hi dear friends

              Both ways are ok and I have tested them both.
              I find the second way of doing easier then declaring first the string to be used. For sure a matter of taste.

              Many thanks.

              Comment

              Working...
              X