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
puls switching
Moderator: RDNZL
Re: puls switching
Is there nobody who can help me? Are there some samples about the way to make some script. At the moment I dont untherstand the language. I have some programming experience whit robots. That language is 'Karel'.
I hope that some one can give me an example,or tell me what language this scripting is.
Regards Bob
I hope that some one can give me an example,or tell me what language this scripting is.
Regards Bob
Re: puls switching
The if is a condition and the then is an action. Try splitting things up and you'll see it will work. There are some good examples here that you can use: http://www.domotiga.nl/projects/domotig ... ser_Manual and yes you could just use value 2 or 3 of that switch as long as nothing else is using it.
Kind Regards,
Greg.
Greg.