Page 1 of 1
on-off lamp problem
Posted: Tuesday 01 September 2020 15:58
by diman27
Hello to all. Help solve the problem. The light blinks and sometimes turns off. And it also blinks and turns on. If you select different buttons, then everything works, one does not work. Show an example of how to do it. Sorry for my bad english.

- 2020-09-01_20-56-11.png (18.51 KiB) Viewed 460 times
Re: on-off lamp problem
Posted: Tuesday 01 September 2020 21:04
by besix
Hey
This script is in a loop, you have to add a user variable whatever you want and check the state of that variable
IF selector = Double Clic AND lampa1 = On AND variable = 0
SET variable = 1
SET Lampa 1 = Off after 1 sec
ElseIF selector = Double Clic AND lampa1 = Off AND variable = 1
SET variable = 0
SET Lampa 1 = On after 1 sec
Re: on-off lamp problem
Posted: Wednesday 02 September 2020 1:27
by diman27
Is this the problem of the blockly itself or am I doing it wrong?