Brad_The_Lucky Posted April 11, 2008 Share Posted April 11, 2008 With all the good ideas being posted lately, I thought I'd just share how I enable a 2 second hold down functionality. There seem to some very complex alternatives being posted too!I have a 6 button in my master bedroom. When I push button 6, everything in the master bedroom turns off. However, if I push the button and hold it for 2 seconds, the entire house will shut off.See attachments..... Link to comment Share on other sites More sharing options...
c44me Posted April 12, 2008 Share Posted April 12, 2008 very nice Link to comment Share on other sites More sharing options...
jbs Posted April 12, 2008 Share Posted April 12, 2008 With all the good ideas being posted lately, I thought I'd just share how I enable a 2 second hold down functionality. There seem to some very complex alternatives being posted too!I have a 6 button in my master bedroom. When I push button 6, everything in the master bedroom turns off. However, if I push the button and hold it for 2 seconds, the entire house will shut off.See attachments.....Brad, that's really awesome. Very elegant. I've just replaced about 10 lines of code for one of my delay switches with about 3 lines thanks to your post. Thanks!I also created a single variable, called PAUSE, which I'm going to use anywhere that I have those short delays. I think the risk that two people are using a PAUSE function at the same time is pretty slim, and since your code sets it back to FALSE at button release, it will always be in the correct default state.Thanks, Brad!! Link to comment Share on other sites More sharing options...
orrinc Posted July 20, 2008 Share Posted July 20, 2008 Thanks!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.