@Ath
Thank you, but its not about connecting an led, but about getting use to the rules and the syntax. The led blink thing is just a test.
I updated to build 147, nothing changed, same behavior.
@grovkilen
I updated to build 147, nothing changed, same behavior.
I played a bit and i found out, that starting a timer on boot with timerset 1,1 and a timerset 1,0 (which reading the manual should disable the timer) in every occurency of the timer results in a timer coming up precise every second. Is this the planed behavior?
But now, playing again with my led toogle thing, i would like to use a variable to store the actual value and to toogle. Reading the forum i came out with a for example let 1,1 to store the value in the variable and a %v1% or a [VAR#1] to get the value out of the variable. But this doesnt work (again
). Please see my rule and find my fault, PLEASE!
Code: Select all
On System#Boot do
timerSet,1,1 // start timer 1 with 1 second
pcfgpio,1,0 // set initial state of the led to off
let 1,1 // store 1 into variable 1 for the state "led_off" (1)
endon
On Rules#Timer=1 do
if [VAR#1]=1 // is current state "led_off" (1)
pcfgpio,1,1 // set led on
let 1,2 // set new state to "led_on" (2)
endif
if [VAR#1]=2 // is current state "led_on" (2)
pcfgpio,1,0 // set led off
let 1,1 // set new state to "led_off" (1)
endif
timerSet 1,0 // "disable timer 1", which results in firing the event of timer 1 in 1 second
endon
Thank you for looking at my thread. As i said, i'm trying to get use to espeasy and the rules for the decission to use it or not.
Thanks!