Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending color command with Arduino according to IEC 62386-209 #11

Open
ghost opened this issue May 27, 2024 · 2 comments
Open

Sending color command with Arduino according to IEC 62386-209 #11

ghost opened this issue May 27, 2024 · 2 comments

Comments

@ghost
Copy link

ghost commented May 27, 2024

The library works fine, but how can I send color commands according to IEC 62386-209 with Arduino? The example command is as follows: Address 0, r=0%, g=100%, b=keep, w=100% with RGBW cutoff Dali.sendArc(0,"00FEFFFE");

@hubsif
Copy link
Owner

hubsif commented May 30, 2024

I've never done it myself, but perhaps this explanation here helps understand the general idea of 209.

@thewhobox
Copy link

You are very limited with 2 bytes of commands.
So you cant fit rgb in one command.
What dali does:

  • store every value in a dtr
  • tell the device to use this as rgb
  • activate it

This is what i do for rgb:

        sendSpecialCmd(DaliSpecialCmd::SET_DTR, r);
        sendSpecialCmd(DaliSpecialCmd::SET_DTR1, g);
        sendSpecialCmd(DaliSpecialCmd::SET_DTR2, b);
        sendSpecialCmd(DaliSpecialCmd::ENABLE_DT, 8);
        sendCmd(DaliCmdExtendedDT8::SET_TEMP_RGB_LEVEL);
        sendSpecialCmd(DaliSpecialCmd::ENABLE_DT, 8);
        sendCmd(DaliCmdExtendedDT8::ACTIVATE);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants