Skip to content

Supporting RGB+W in the Neopixel library.  #690

@ssav7912

Description

@ssav7912

Hi, first query on Github so I apologise for any missteps I make.

I've been looking to use one of adafruits 16 pixel WS2812 RGB+W neopixel rings in a project, and find that it behaves strangely when using it on the microbit. I realise that this is because this micropython microbit neopixel library only supports RGB, so the data sent to the ring is undershooting by a byte(?). I would like to make changes to the library in order to support RGB+W - I don't mind terribly if there's no conditional handling for 3 or 4 channels and such.

The assembler function in the source (neopixelsend.s), has comments that make references to needed changes to support RGB+W, but I'm not sure what they are, having only an abstract grasp of assembler. My suspicion is that I should be able to add an extra channel in the modneopixel.cpp file and it should just send the appropriate data to r5 (num. LEDs * 4 rather than 3), to count to zero from, or does the assembly assume 3 channels per pixel throughout and doing this will break things?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions