203
-- get new value
new = math.min(100, val + step)
new = math.max(0, new)
-- no change, stop
if new == val then
return
end
-- write new value
val = new
grp.write(out, new, dt.scale)
-- wait for next run
os.sleep(delay)
end
end
2) Create 3 objects:
1/1/1 - binary (dim up)
1/1/2 - binary (dim down)
1/1/3 - 1-byte scale (output)
3) Create an event script for each binary object:
bindimmer('1/1/1', '1/1/2', '1/1/3', event)
4) You can tune step and delay variables in bindimmer function to adjust dimming
speed.
DALI commands