Announcement

Collapse
No announcement yet.

Reading a slider value

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

  • Reading a slider value

    Hi,
    I'm new on this forum, I have been working with Workshop 4 for a week now, using Visi-Genie and Arduino IDE.
    I don't understand how do you read a slider value. I tried the function int slider_value = genie.ReadObject(GENIE_OBJ_SLIDER, 0); but this always returns me slider_value = 1.
    I didn't find any documentation about this so I hope you can help me ^^
    Thanks

  • #2
    Hello,
    Welcome to the forum! To read slider value, first on Workshop4 go to Events and set OnChanged and OnChanging to
    ReportMessage. Here’s a reference appnote for that https://www.4dsystems.com.au/downloa...0010_R_1_0.pdf.
    This way every time slider value change it will report it automatically, you
    just need to utilize the GENIE_REPORT_EVENT for you to read the value of the slider.
    You can also do it without changing the event status using GENIE_REPORT_OBJ.

    I have attached a sample code for you. Hope it helps.

    Best regards,
    Bern
    Attached Files

    Comment


    • #3
      Thank you for your answer, it works great !

      Comment


      • #4
        Hello,

        It's nice to hear that. If you have more questions you can always reach our forum.

        Best regards,
        Bern

        Comment

        Working...
        X