Announcement

Collapse
No announcement yet.

Change the state of a button

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

  • Change the state of a button

    How would I change the state of a display button with an "if" statement?

    Thank you,
    GadgetBandit

  • #2
    Originally posted by GadgetBandit View Post
    How would I change the state of a display button with an "if" statement?

    Thank you,
    GadgetBandit
    Buttons are meant to change the state of things, not be changed externally.

    You can change variable images, or multi-images (made just for this capability really).

    What are you trying to do?
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

    Comment


    • #3
      I'm cycling a value with "when" tasks and want a manual off/on button that "appears" to change state when "when" turns on/off the value.

      A transparent button over a multi image!

      "when" and the button set variables

      The output is handled with "if"

      GadgetBandit

      Comment


      • #4
        Today I discovered that a button instance for triggering an output, changes state when you have a "when" statement also triggering the same output. After "when" triggers, the button becomes an "off" button until the next "when" cycle. Pretty cool. Exactly what I wanted.

        Thanks,
        GadgetBandit

        Comment


        • #5
          Originally posted by GadgetBandit View Post
          Today I discovered that a button instance for triggering an output, changes state when you have a "when" statement also triggering the same output. After "when" triggers, the button becomes an "off" button until the next "when" cycle. Pretty cool. Exactly what I wanted.

          Thanks,
          GadgetBandit
          For that to work, you have to make sure your button is "attached" to the digital output.

          If you change it to "detached" that won't happen.
          Fusion Brain Version 6 Released!
          1.9in x 2.9in -- 47mm x 73mm
          30 Digital Outputs -- Directly drive a relay
          15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
          Buy now in the MP3Car.com Store

          Comment

          Working...
          X