-
Notifications
You must be signed in to change notification settings - Fork 1
LED patterns
Here are all the pattern functions for the LED ring with examples and images.
To use the patterns, simply call the start functions once and the LEDs will keep updating until you call an other function or noPattern().
Note
Make sure you have first initialized the LED ring.
byte redbyte greenbyte blue
encoder.positionDotPattern(25, 25, 25); //start the dot pattern with a white, approx. 10% bright dotcoming soon
byte redbyte greenbyte blue
encoder.fillBarPattern(25, 25, 25); //start the bar pattern which will be filled from the first pixelcoming soon
This function is just like the bar pattern but with a gradient between the two colors with the start and end colors always being at full saturation at the end of the currently visible spectrum. With fixedGradientBarPattern() the full saturation is always at the first and last LED, even if that LED is off.
byte startRedbyte startGreenbyte startBluebyte endRedbyte endGreenbyte endBlue
// start colors | end colors
// r, g, b, |r, g, b
encoder.gradientBarPattern(0, 25, 0, 0, 0, 25); //start the bar pattern which will be filled from the first pixel with a green-blue gradientcoming soon
This function is like the default bar pattern but with a gradient with the start and end colors fixed to the first and last LEDs of the ring or bar instead of the first and last turned on LEDs. That behavior is available with the gradientBarPattern() function.
byte startRedbyte startGreenbyte startBluebyte endRedbyte endGreenbyte endBlue
// start colors | end colors
// r, g, b, |r, g, b
encoder.fixedGradientBarPattern(0, 25, 0, 0, 0, 25); //start the bar pattern which will be filled from the first pixel with a green-blue gradientcoming soon