This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Button dimming (8-bit value)
#4
Hi,

You could try something like this:

Code:
1234567891011121314151617181920212223242526272829
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
BR,

Erwin
Reply


Messages In This Thread
Button dimming (8-bit value) - by Jayce - 09.04.2018, 12:24
RE: Button dimming (8-bit value) - by Jayce - 10.04.2018, 07:16
RE: Button dimming (8-bit value) - by Erwin van der Zwart - 10.04.2018, 10:50
RE: Button dimming (8-bit value) - by alexll - 09.11.2021, 09:05
RE: Button dimming (8-bit value) - by Jayce - 10.04.2018, 11:05
RE: Button dimming (8-bit value) - by Jayce - 11.04.2018, 07:22
RE: Button dimming (8-bit value) - by Jayce - 13.04.2018, 09:40
RE: Button dimming (8-bit value) - by Jayce - 16.04.2018, 06:43
RE: Button dimming (8-bit value) - by admin - 16.04.2018, 11:32
RE: Button dimming (8-bit value) - by Bobby - 16.04.2018, 11:47
RE: Button dimming (8-bit value) - by Jayce - 16.04.2018, 11:55
RE: Button dimming (8-bit value) - by Daniel - 16.04.2018, 15:11
RE: Button dimming (8-bit value) - by Jayce - 17.04.2018, 09:06
RE: Button dimming (8-bit value) - by admin - 09.11.2021, 09:09
RE: Button dimming (8-bit value) - by alexll - 09.11.2021, 09:36

Forum Jump: