This recipe will explore how the slicing feature can be used to set a specific range of pixels to a specific color. This can be quite useful when you want to turn the ring of pixels into a gauge to show the level of a value from 1 to 10. Essentially, it provides a clearer and simpler way of setting a range of pixels to a particular color.
Setting a range of NeoPixels to one color
Getting ready
You will need access to the REPL on the Circuit Playground Express to run the code presented in this recipe.
How to do it...
To do this, perform the following steps:
- Run the following...