puls switching
Posted: Tue Jan 08, 2013 10:44 pm
dear members,
i use now for 2 monhts domotiga whit succes.
i want to built an new fuction, i have an switch that can go on and off.
and i want if i press the on button its switch an variabele so i have 2 switches. exemple i press on var go's to 1 i press again on var go's to 2 and that repeats. same for the off button.
i have tried to write a script in an action but i constand get an "unexpected if". And i cant find anywere how to use this scripts. this is approximately what i have make.
If Var_schakelaar 1=1 then Var_schakelaar 1=2
if Var_schakelaar 1=2 then Var_schakelaar 1=1
Schakelaar 1 is a global variabele. can someone help me how i do this the best. i rather use value 2 and 3 from the switch is this also posible
sorry for my bad english i hope that u undestand.
regards Bob
i use now for 2 monhts domotiga whit succes.
i want to built an new fuction, i have an switch that can go on and off.
and i want if i press the on button its switch an variabele so i have 2 switches. exemple i press on var go's to 1 i press again on var go's to 2 and that repeats. same for the off button.
i have tried to write a script in an action but i constand get an "unexpected if". And i cant find anywere how to use this scripts. this is approximately what i have make.
If Var_schakelaar 1=1 then Var_schakelaar 1=2
if Var_schakelaar 1=2 then Var_schakelaar 1=1
Schakelaar 1 is a global variabele. can someone help me how i do this the best. i rather use value 2 and 3 from the switch is this also posible
sorry for my bad english i hope that u undestand.
regards Bob