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.

CANx dimming
#1
I would like to dim the light over CAN-UI10 device with 10 one-bit inputs  and IKEA LED strip for dimming.
IKEA has opportunity to dim either with 4 bit or with one byte. Who can help me to develop a script which will do a following: by clicking a button and holding the light will increase brightness for 5% every 0,5 second. And by clicking another button and holding the light will decrease brightness for 5% every 0,5 second. I'm ready to pay for this job.
Reply
#2
You can convert 1 bit start/stop to 4 bit up/down/stop via a simple script.

Press (true) = Up, Release (false) = Stop
Code:
value = event.getvalue() and 9 or 0
grp.write('32/1/1', value, dt.bit4)

Press (true) = Down, Release (false) = Stop
Code:
value = event.getvalue() and 1 or 0
grp.write('32/1/2', value, dt.bit4)
Reply


Forum Jump: