25.08.2021, 09:36
(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.excuse me admin dor this question, it's for learning.
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
why do you use grp.find.
could we use grp.write(add,value) instead
Best Regards,