I'm building an ozone device, triggered by a PIR sensor.
Everything is connected correctly, and the Devices are Populated correctly.
The goal of this Rules, is to "activate" the Relay for 4 seconds, when something trigger the PIR sensor.
When doing that, an ozone generator and a fan is activated.
What i want to add, is a secondary timer, to prevent the activation of the ozone genrator more than once in 2 minutes.
Unfortunatly my Rules does not work... Any idea ?
Code: Select all
On System#Boot do
timerSet,2,120
Endon
On Infrarouge#State=1 do
If [Rules#Timer]=2
GPIO,23,1
GPIO,16,1
timerSet,1,4
Endif
Endon
On Rules#Timer=1 do //When Timer1 expires, do
GPIO,23,0
GPIO,16,0
timerSet,2,120
endon