01.10.2016, 14:18
(30.09.2016, 19:41)buuuudzik Wrote:(30.09.2016, 14:43)Domoticatorino Wrote: Dear All,
I would like to make a pushbutton for shutter. I mean that this button should send "1" or "0" everytime I push it but graphically the state has to come back to the original state.
I hope to be clear.
Thank you very much.
Claudio
This should be 2 buttons: up and down. Every button should has the status object. Like here:
UP main:1/1/1 status:1/1/2
DOWN main:1/1/3 status:1/1/4
Main object should have event script with e.g.
Code:status = '1/1/2'
time = 1 -- how much seconds to go back to normal image
grp.write(status, true) -- change the image to "clicked"
os.sleep(time) -- wait
grp.write(status, false) -- change the image to "normal"
Ok. Done. Thank you.