Skip to content

Improve performance with (optional, disabled by default) manual sync #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 6, 2022

Conversation

meh2481
Copy link
Contributor

@meh2481 meh2481 commented Oct 4, 2022

Digging through the Arduino side of things, I found there's a manual sync step after any pixel change, whereas the CircuitPython libraries will by default auto-sync any time a pixel is changed. This is ideal from a user standpoint, but if you update more than one pixel at a time it slows down significantly, as there's an I2C transmit every time you update a single neopixel. For anyone who wants to update multiple pixels at a time, I've added a way to do a single manual sync after a lot of pixels are changed. Based on my tests, this really improves performance if making animations across e.g. a 2x2 multitrellis.

Of course, I've left the default behavior as-is for backwards compatibility.

Add auto_write (default true) and sync method
Add manual sync method
@tekktrik tekktrik requested a review from a team October 4, 2022 23:36
Copy link
Member

@gamblor21 gamblor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I do not have the hardware to test but went over the code and the original code and see no issues.

@gamblor21 gamblor21 merged commit e8c4312 into adafruit:main Oct 6, 2022
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.

2 participants