Apologies if this is already covered in the documentation, I couldn't find a solution to this.
So, I have a 30 LED Neopixel strip that I'm wiring up to a Raspberry pi pico. I'm coding on the pico using Circuitpython.
Now, I initialise my pixels using the following code
Code: Select all
import board
import neopixel
num_pixels = 30
pixels = neopixel.NeoPixel(board.GP0, num_pixels)
pixels.fill((283, 80, 0))
Code: Select all
pixels[5] = (28, 8, 0) #Dimming a single pixel
pixels[5:7] = 2*(28, 8, 0) #Dimming a sequence of pixels
Code: Select all
pixels[5, 7, 15] = 3*(28, 8, 0)
But doing so gives me an error about how neopixel indices must be integers and not tuples. So I wanted to ask if there's any way I could index multiple, non-sequential neopixel LEDs?
Thanks!