bigdaddyo811 Posted September 4, 2010 Share Posted September 4, 2010 I have a 3 button keypadButton 1:If variable musicbathroom is TRUE turn volume up 1If variable musicbathroom is FALSE turn light onButton 2Toggle musicbathroomIF variable musicbatrhoom is TRUE Play playlistxIF variable musicbathroom is FALSE disconnect audio output 1Button 3:If variable musicbathroom is TRUE turn volume down 1If variable musicbathroom is FALSE turn off lightThe 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 2Any ideas?bdo Link to comment Share on other sites More sharing options...
ILoveC4 Posted September 4, 2010 Share Posted September 4, 2010 Are they bound together? Link to comment Share on other sites More sharing options...
bigdaddyo811 Posted September 4, 2010 Author Share Posted September 4, 2010 What does "binding" mean? Link to comment Share on other sites More sharing options...
henniae Posted September 5, 2010 Share Posted September 5, 2010 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 More sharing options...
bigdaddyo811 Posted September 5, 2010 Author Share Posted September 5, 2010 Thus I assume it should be NOT binded to work properly? Link to comment Share on other sites More sharing options...
ILoveC4 Posted September 5, 2010 Share Posted September 5, 2010 Right. For your application as described if they wee bound it would cause the described behavior. Link to comment Share on other sites More sharing options...
bigdaddyo811 Posted September 5, 2010 Author Share Posted September 5, 2010 The 3 button is not bound to the other switches. The other switches in the room are bound.Any other thoughts? Link to comment Share on other sites More sharing options...
henniae Posted September 6, 2010 Share Posted September 6, 2010 Can you post an actual screen capture of your code. Are the statements below the IF indented? Link to comment Share on other sites More sharing options...
bigdaddyo811 Posted September 6, 2010 Author Share Posted September 6, 2010 Here it isButton 1 then Button 2 then Button 3 Link to comment Share on other sites More sharing options...
henniae Posted September 6, 2010 Share Posted September 6, 2010 Here it isIt 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 More sharing options...
bigdaddyo811 Posted September 7, 2010 Author Share Posted September 7, 2010 Sorry. I'm learning this stuff. I added the other two buttons programming Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.