timer in blockly?
Posted: Wednesday 04 April 2018 16:01
i have a question, i am using a motion sensor to trigger my bathroom lights and turn them off after x minutes.
the only problem is that the turn off action does not reset when motion is triggerd when the lights are on so the lights turn off after x minutes and turn then back on, so if i am in my bathroom for an extended period of time the light flickers. is there some way to create for example a timer which counts to an x number and if x number is reached the light turns off but if there is motion again and the lights still are on reset the timer so it starts over.
maby there is some genious out here who has the solution i can not seem to figure out myself.
the only problem is that the turn off action does not reset when motion is triggerd when the lights are on so the lights turn off after x minutes and turn then back on, so if i am in my bathroom for an extended period of time the light flickers. is there some way to create for example a timer which counts to an x number and if x number is reached the light turns off but if there is motion again and the lights still are on reset the timer so it starts over.
maby there is some genious out here who has the solution i can not seem to figure out myself.