Skip to content

Can you set the colour of individual LEDs based on their physical location along the string? #18

Answered by Anders-Holst
MaxPalmer-UH asked this question in Q&A
Discussion options

You must be logged in to vote

Yes it is indeed possible.

The function make_func_pattern in HighControlInterface produces a pattern based on the led index along the string. It takes a function as argument, which in turn takes the index of one led and returns the color of that specific led as an (r,g,b)-tuple.

Note that many devices have two strings emanating from the device, and the ordering of the leds start at one string closest to the device and goes to the tip of that string, then starts from closest the device on the other string and goes to the tip. So if you arrange them in a line with the device in the middle, or in a circle where the two tips touch each other, the indices would make a jump in the middle, from …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@DrMaxP
Comment options

Answer selected by Anders-Holst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants