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

Support for RGBW LEDs like SK6812RGBW #143

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

che-effe
Copy link

This PR will allow for creating any color using RGBW pixels and strips.
TODO:

  • make it configurable so that RGBW is not the default to minimize bandwidth usage
  • update tests

This is a WIP and I'm placing this PR mostly to communicate what was missing from a previous attempt at this work to get all colors working as expected and to save state of the work.

@@ -261,6 +264,9 @@ void process_command(byte argc, byte *argv){
case PIXEL_COLOUR_BRG:
setColorOrderBRG();
break;
case PIXEL_COLOUR_RGBW:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajfisher I have made some protections within pixel.js to make sure that by default, we send an array with length of 3. We send 4 if rgbw colors are declared at instantiation. I'm going to work on adding similar protection here I think, to make sure all is good within the firmware.I wanted your feedback on this approach so far before I get too into it. Please let me know your thoughts on what I have in the PR to this point. I will also go back and make sure all tests pass within the next few days. Thanks!

@@ -261,6 +281,11 @@ void process_command(byte argc, byte *argv){
case PIXEL_COLOUR_BRG:
setColorOrderBRG();
break;
case PIXEL_COLOUR_RGBW:
isRGBW = true;
color_depth = 4;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajfisher I'm trying to make the value color_depth changable on the fly from 3 to 4. This doesn't seem to be working for me. Can you give me some guidance as to where I can change this value when switching to RGBW?

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

Successfully merging this pull request may close these issues.

None yet

1 participant