Skip to content

RP2040 NeoPixel __setitem__ is missing #264

@DeflateAwning

Description

@DeflateAwning

The NeoPixel example from the MicroPython rp2 docs is as follows:

from machine import Pin
from neopixel import NeoPixel

pin = Pin(0, Pin.OUT)   # set GPIO0 to output to drive NeoPixels
np = NeoPixel(pin, 8)   # create NeoPixel driver on GPIO0 for 8 pixels
np[0] = (255, 255, 255) # set the first pixel to white
np.write()              # write data to all pixels
r, g, b = np[0]         # get first pixel colour

The example gives a warning on the np[0] = (255, ...) line, because it can't find the __setitem__ method of the NeoPixel class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstubs

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions