Input time widget pause?

Hi friends. is it possible to pause the input time widget ? for example I using input time widget to turn on an UV light between the 18:00-18:50 and if PIR sensor detect moves pause the time and turn off the UV light then when there is no moves continues time and turn on the UV light.

thanks

You can reset the time. You have a reset option inside the time input widget. Then it will be 00:00:00 .Then it will not trigger. Also depends on your sketch.

No I don’t need reset the time just need to continues the timer to end.

You need to set a flag if you want to stop the trigger.
if (sensor == high) {
flag = 1; // this will control the relay trigger
} else {
flag = 0;
}
So this will stop the UV light till the PIR sensor is high (motion sensed)
This is just a snippet code…

2 Likes

Set a trigger flag the best way

1 Like

thanks I will try it