testing with some rules, tested with Mega version mega-20190311
With running into problems i tried an old MegaV2, same result.
Code: Select all
on System#Boot do
gpio,2,0
timerset,1,10 //Set Timer 1
enddo
on rules#timer=1 do //if Timer1 expires
taskvalueset 5,1,1 //set dummy#var1 to 1
timerset,2,10 //Set Timer2
enddo
on rules#timer=2 do //If Timer2 expires
taskvalueset 5,1,0 //set dummy#var1 to 0
timerset,1,10 //Set Timer1
enddo
on dummy#var1 do //If dummy#var1 changes
gpio,2,[dummy#var1] //Set GPIO2 to dummy#var1
enddo
The dummy#var1 is set to the last taskvalueset command, GPIO2 is set to that value.
Swapping taskvalueset 5,1,1 and taskvalueset 5,1,0 shows it always remains on the last taskvalueset value.
The timer1/Timer2 sequence should toggle it but does not. I don't see any timer events in the log.
Second problem
The GPIO2 is set to that value only once.
If i manually send a taskvalueset, the "on dummy#var1 do" is not recognized.
By the log the event from dummy#var 1 is generated.
It seems to me that even the "On dummy#var1" is not executed.
What is going wrong? Maybe I'm partially blind again