I have this in my rules1.txt
Code: Select all
On System#Boot do
gpio,12,0 //esp test test 1=aan 0 = uit
mcpgpio, 6,0 //MCP23017 test 1=aan 0 = uit
let,1,0
let,2,0
timerSet,1,5 //Set Timer 1 for the next event in 5 seconds
timerSet,2,1 //Set Timer 2 for the next event in 2 seconds
endon
On Rules#Timer=1 do
timerSet,1,5 //Set Timer 1 for the next event in 5 seconds
if [VAR#1]=1
let,1,0
gpio,12,0
else
let,1,1
gpio,12,1
endif
endon
On Rules#Timer=2 do
timerSet,2,1 //Set Timer 2 for the next event in 2 seconds
if [VAR#1]=1
let,2,0
mcpgpio, 6,0
else
let,2,1
mcpgpio, 6,1
endif
endon
The first goes on and then after 5 seconds of, then led 2 on MCP23017 for 2 seconds and the loop.
But the timer of MCP23017 should normal blink faster then the timer 1.
is that normal or do i have i fould in my code?