25.08.2021, 22:37
(25.08.2021, 09:26)admin Wrote: This example will dim 3 lights from 0% to 100% in 10% steps with 0.2 seconds delay between each step. You can adjust the step/delay as needed and also add new group addresses to the list.
Code:step = 10
delay = 0.2
addrs = { '32/1/15', '32/1/16', '32/1/17' }
for _, addr in ipairs(addrs) do
obj = grp.find(addr)
for value = 0, 100, step do
obj:write(value)
os.sleep(delay)
end
end
Thanks for your response.
How can I make it go like that and then opposite. When the third light reaches 100%, then it should dim to 0%, then the second should dim to 0%, and then first. And how to make a loop that the whole process repeats again, and how to stop that loop?