๐ŸŽ„โ›„โ„๏ธ๐ŸŽ It's beginning to look a lot like ADABOX-mas! The next ADABOX from Adafruit ships soon! Get yours now, or give as a gift! ๐ŸŽ„โ›„โ„๏ธ๐ŸŽ
0

Dotstar RGB issues
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Dotstar RGB issues

by mitch33333 on Wed Oct 09, 2019 11:08 pm

Hi, It looks like my Dotstar strip has the the RGB switched around. I can get decent colors by taking RGB values by using
Code: Select all | TOGGLE FULL SIZE
strip.Color(0,255,0);
but would prefer to use
Code: Select all | TOGGLE FULL SIZE
ColorHSV(0,255,50);
. It seems I have (GRB) which gives me very incorrect results when trying to use ColorHSV(). Does anyone have a way to use ColorHSV with (G,R,B) so I can find more accurate colors?

Also, I'm using at ATTiny85 for this project.

Thanks,

mitch33333
 
Posts: 16
Joined: Fri Feb 12, 2016 3:00 pm

Re: Dotstar RGB issues

by adafruit_support_carter on Thu Oct 10, 2019 3:28 pm

Are you using the DotStar library?
https://github.com/adafruit/Adafruit_DotStar

adafruit_support_carter
 
Posts: 13588
Joined: Tue Nov 29, 2016 2:45 pm

Re: Dotstar RGB issues

by mitch33333 on Thu Oct 10, 2019 3:40 pm

Yes I am, But I got it using the dotstar uberguide and not GitHub. These should be the same either way though, right?

mitch33333
 
Posts: 16
Joined: Fri Feb 12, 2016 3:00 pm

Re: Dotstar RGB issues

by adafruit_support_carter on Thu Oct 10, 2019 4:08 pm

Yep. Should be the same thing. If you installed via the Arduino Library Manager, then you got whatever the latest release is from that GitHub repo.

The internal mapping of the colors, like RGB vs GRB should be handled by the library. You specify what you have when you create the DotStar object:
https://github.com/adafruit/Adafruit_Do ... tar.h#L104
So if you have GRB, then use DOTSTAR_GRB.

After that you can think in terms of RGB for all the library functions. The actual color order will be mapped internally by the library.

adafruit_support_carter
 
Posts: 13588
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.