Skip to content

Extension: add Neopixel Extended#7008

Merged
abchatra merged 2 commits into
microsoft:masterfrom
martinwork:add-neopixel-extended
Jul 15, 2026
Merged

Extension: add Neopixel Extended#7008
abchatra merged 2 commits into
microsoft:masterfrom
martinwork:add-neopixel-extended

Conversation

@martinwork

Copy link
Copy Markdown
Contributor

@abchatra

abchatra commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

@riknoll wondering if the new grid matrix be used here instead?

@PasAlt

PasAlt commented Jul 8, 2026

Copy link
Copy Markdown

@riknoll wondering if the new grid matrix be used here instead?

I'd love to have a look at it. Where can I find it?

@riknoll

riknoll commented Jul 8, 2026

Copy link
Copy Markdown
Member

oh yeah, it totally can! @PasAlt it hasn't been shipped yet but will be on friday. once it's released, i'll give you an example to work off of that shows how to use it

@PasAlt

PasAlt commented Jul 11, 2026

Copy link
Copy Markdown

oh yeah, it totally can! @PasAlt it hasn't been shipped yet but will be on friday. once it's released, i'll give you an example to work off of that shows how to use it

@riknoll Does the pins.setMatrixWidth() do something else than just inform the simulator that it should be displayed as a matrix? So could it have a side effect just to put it like this in my code:

setMatrixWidth(width: number) {
    this._matrixWidth = Math.min(this._length, width >> 0);
    pins.setMatrixWidth(this.pin, this._matrixWidth)
}

@PasAlt

PasAlt commented Jul 11, 2026

Copy link
Copy Markdown

I updated the extension to Version 2.1.2 (PasAlt/pxt-neopixel-matrix-extension@6c0d5f2)

Added the pins.setMatrixWidth() to setMatrixWidth(). Updated the tests to reflect it correctly. Updated to version 9.0.2 in pxt.json.

One thing to consider for the future: All of the Neopixels that I used till now were not wired the way the simulator expects it. Normally they are wired in a "snake"format, e.g. first row left to right, then second row right to left, then third row left to right, etc.

@abchatra

Copy link
Copy Markdown
Collaborator

@martinwork can you look at the updated extension?

@PasAlt

PasAlt commented Jul 14, 2026

Copy link
Copy Markdown

@martinwork It is two lines of code. You can find it in this commit: PasAlt/pxt-neopixel-matrix-extension@59a1643

@martinwork

Copy link
Copy Markdown
Contributor Author

@abchatra
abchatra enabled auto-merge July 15, 2026 00:07
@abchatra
abchatra added this pull request to the merge queue Jul 15, 2026
Merged via the queue into microsoft:master with commit 9458c3d Jul 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants