Bibliscan Posted May 29, 2012 Share Posted May 29, 2012 Hi guysI have a ca motion sensor that controls my outdoor lights via a c4 outlet switch. It's programmed so that if the sensors light level falls below 20% and it senses motion to turn on the lights then after 30 seconds to turn them off. I want to be able to override it so that if I choose to turn it on manually when the light level is below 20% to not turn it off after 30 seconds. And if I do manually turn off the lights it goes back to being controlled though motion sensing. How would I program that? Link to comment Share on other sites More sharing options...
Ryanjackson Posted May 29, 2012 Share Posted May 29, 2012 Create a boolean variable called override. Then have some way to toggle the variable a custom button? or a button on a 6 button or even a double tap on that light switch. Then where you have your programming put an if variable "if override is true" then nest a "stop" after that. then when the overide is true it will not get to the turn light off.Hope that makes senseRyan Link to comment Share on other sites More sharing options...
AceOfSpades Posted May 29, 2012 Share Posted May 29, 2012 To add to Ryan's response, I would change the LED color when the override is activated. Link to comment Share on other sites More sharing options...
Bibliscan Posted May 29, 2012 Author Share Posted May 29, 2012 I'm not that great with variables. Can someone be more specific to write this code. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.