No announcement yet.

Arduino library (GenieArduino.h) : Is it possible to update a label?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Arduino library (GenieArduino.h) : Is it possible to update a label?

    Hello everybody,

    I just got my 32ULCD and I'm amazed how fast I've been able to setup a professional interface !
    But it's now time to get the hands dirty, and I've serveral question using the arduino library.

    First I'm not a pro in serial communication, so just having one line of code on the arduino side to get info from the screen and send some is perfect.

    But I don't understand how I can update a label (or a string, it seems strings are a bit more tricky to handle) with a sensor value. It's working great with led digits, but I just want a simple text line updated with the sensor value.

    I was thinking label was the easiest to process, but when reading the library I don't see any specifi Object realted to "label" only "strings"

    In my code I wrote

    genieWriteObj(GENIE_OBJ_STRINGS, 0, value1); // Value1 is the sensor value and i want to update strings0 on form4

    is this right? or strings are not updated that way ?

    Last thing to have all the informations, the string is on a 4th form (form4) and not on a fixed form0, maybe does it changed something as I may have read in an other post...

    Thanks for help!


  • #2

    You can only update a string, labels are 'static'

    genieWriteObj() is only to select a string from those that are predefined, you need to use a different call to send a string. (I'm not sure exactly what that call is, hopefully someone more familiar with Arduino will let you know)

    Sent strings are only displayed on the 'current' form and will be lost when changing forms.

    so it would seem better to do it with leddigits, or custom digits and design the layout differently.


    • #3

      Thanks for the reply !

      Ok so I have two options if I use the library, use strings but with a different code I don't know yet, or use led digits/custom digits.

      Considering I didn't need/want something fancy, but just show the value, I will continue searching for updating strings with arduino.

      Any plan on providing a user guide with the arduino library, explaining a bit each command?

      Thanks again for support and I'm still looking for the arduino code for updating a string with a non-stored value



      • #4

        We are working on 'new' arduino libraries at the moment (especially to properly support the different hardware).

        App notes will come as part of that.

        I think there was a recent post here about a geniewritestring command, not sure.


        • #5

          That's a great news ! Can't wait to test the new library

          I just test the custom digits and I think they can fit my need for now until I fully understand how strings work with arduino.