How to Program a Mode Selector to a button.

Written By engineerisaac

Posted: Fri, May 17, 2019 at 11:46 AM - Showing 388 Views


Ok so you want to have a single button rotate between a handful of different options. This example below will allow you to "Rotate" a 4 option wheel. This is best for things like picking stations from a keypad.


First you need to create a number Value variable.
http://www.engineerisaac.com/screenshots/DASH_1943a5.png
This varible will be the powerhouse operator that stores the value. as well if you change this number via any programming the keypad and programming will react to the changes.

Then Match Programming like this to the button.
https://engineerisaac.com/screenshots/DASH_c31ad0.png
Every time the button is pressed it Checks where the Varible is. If the variable is above its limit in this instance 4 it will reset the button to 1 then stop the execution.

If the button is less then 4 it will skip over the roation check and add +1 to the Variable.


Then go into the variable on change and set this up.
https://engineerisaac.com/screenshots/DASH_b27e42.png
Every time the varible changes from X to Y it will fire the condtion presented within its case.

This is good for setting a TV Source or Picking from a handful of presets in conjunction with the room driver.

(Notice the Rotator starts at 1 But zero is an option. If you want to reset the Wheel to a no selection state. You can set the varible to 0 and it will turn off the assigned light. This is best to bond the varible in "Room Off" to set the varible to Zero. That way the selector is ready for another selection to turn the room back on.

Comments:
Nobody
This Isnt Finished yet.
Leave a Comment: