Skip to content

Please add alt_rgb_pins kwarg for RBG matrices #25

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

Closed
PaintYourDragon opened this issue Oct 5, 2020 · 6 comments · Fixed by #26
Closed

Please add alt_rgb_pins kwarg for RBG matrices #25

PaintYourDragon opened this issue Oct 5, 2020 · 6 comments · Fixed by #26

Comments

@PaintYourDragon
Copy link

Akin to the alt_addr_pins kwarg. Some matrices (including the 2.5mm pitch 64x64 from Adafruit) have green and blue swapped. This is already manifesting in the field, not a hypothetical situation:
https://twitter.com/firehoppr/status/1313180528556871682
https://forums.adafruit.com/viewtopic.php?f=60&t=170249&p=832142#p832142

@makermelissa
Copy link
Collaborator

It seems there is only RGB and RBG, so a flag to swap the order may make more sense. What do you think?

@PaintYourDragon
Copy link
Author

Based on past experiences with RGB LED anything, a flag will come back to bite you later. Would recommend either a pin list, or accept a string like 'RBG', 'BGR' etc. and use the character positions (case-insensitive) to remap 'Portal pins.

@makermelissa
Copy link
Collaborator

Ok, cool. I like the option of adding an RGB order parameter. We can start with these 2 cases and add more as needed.

@PaintYourDragon
Copy link
Author

Recommend just handling all the cases now. These matrices WILL change again and again, without announcement.

Dang I could SWEAR I had code for handling this in another project…oh, might’ve been the light painter or something…I’ll rummage around and get back to you!

@PaintYourDragon
Copy link
Author

Starting around line 60 here:
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/master/CLUE_Light_Painter/bmp2led.py

Huh. Could’ve sworn I had something that handled malformed cases better…but maybe that was something else, an older Arduino project, or I just dreamt the whole thing.

@makermelissa
Copy link
Collaborator

We can just check it r, g, or b is not found (-1) and just raise an error.

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