10.04.2018, 10:50
(This post was last modified: 10.04.2018, 10:50 by Erwin van der Zwart.)
Hi,
You could try something like this:
BR,
Erwin
You could try something like this:
Code:
addressbyteoutput = '32/1/1'
stepsize = 10
value = event.getvalue()
current = grp.getvalue(addressbyteoutput)
if value < 8 then
if current <= stepsize then
output = 0
if current ~= output then
grp.write(addressbyteoutput, output)
end
else
output = current - stepsize
if current ~= output then
grp.write(addressbyteoutput, output)
end
end
elseif value > 8 then
if current >= (100 - stepsize) then
output = 100
if current ~= output then
grp.write(addressbyteoutput, output)
end
else
output = current + stepsize
if current ~= output then
grp.write(addressbyteoutput, output)
end
end
end
Erwin