Jump to content
C4 Forums | Control4

3 button keypad


bigdaddyo811

Recommended Posts

I have a 3 button keypad

Button 1:

If variable musicbathroom is TRUE

turn volume up 1

If variable musicbathroom is FALSE

turn light on

Button 2

Toggle musicbathroom

IF variable musicbatrhoom is TRUE

Play playlistx

IF variable musicbathroom is FALSE

disconnect audio output 1

Button 3:

If variable musicbathroom is TRUE

turn volume down 1

If variable musicbathroom is FALSE

turn off light

The problem is that if I turn the music on and it is playing and then hit the up or down button it adjusts the lights as if the variable is false. The variable is not set anywhere else.

It's almost as there is a huge delay in the variable and or it never registers the change but the music does turn on so it has to be working from button 2

Any ideas?

bdo

Link to comment
Share on other sites


What does "binding" mean?

Binding is a linkage between the keypad and the dimmer that can be setup in Composer Pro to make the keypad control the dimmer. It is an easy way to make the keypad control the dimmer that requires no custom programming to handle all the intricacies of controlling the dimmer from the keypad. Basically with 2 lines of code the binding tells the system to allow the keypad to control the dimmer. If you were to manually program the keypad to control the dimmer it would be many, many lines of code. With bindings the C4 system takes care of all the backend programming. Binding is great if all you want the keypad to do is control the dimmer. If you wan the keypad to be multi-function you need to program all the interaction between the keypad and dimmer manually. Binding a keypad to a dimmer for control is quick and easy because the C4 system takes care of everything. Binding is less flexible because it locks the keypad into controlling the dimmer.

Link to comment
Share on other sites

Here it is

It would be most helpful to see all the code. It is hard to debug when we only have a fraction of the code.

Where does the variable musicbathroom get initialized? I assume it is a boolean variable. Why are you comparing it the the value OFF on button 2. It is a boolean variable so it is either true of false.

When you turn the music on are you only doing that from button 2? If you are not the musicbathroom variable would never get set.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...