0

Neopixels: Arduino library performance or other issue with s
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Neopixels: Arduino library performance or other issue with s

by dremu on Tue Dec 17, 2019 5:25 pm

Gonna have a coupla dozen Neopixels (singles, rings, etc) in a project, ideally running off one Arduino. I've done it before, understand the limitations of power supply and connection issues and such, easy peasy.

However, in this instance it would simplify wiring and coding if I could split the pixels into a few sets, instead of one really long run of set A into set B into set C. I'd then run set A from one pin on the Arduino, set B off another, set C from a third, and of course create multiple Adafruit_NeoPixel objects -- again, no surprise.

Question is, do I take a performance hit in having multiple objects, in memory or CPU or anything? I've never had to really crunch performance on the Arduino, especially with Adafruit stuff, as It Just Magically Works, so I don't even know how to gauge it myself. The last time I did assembler was on a 6502, so reading the library is likely to make my head spin =))

Or maybe for three such objects I'm fussing over nothing and it will also Just Magically Work, but I thought I'd throw it out there and see what the world thinks.

-- A

dremu
 
Posts: 2
Joined: Mon May 28, 2012 7:28 pm

Re: Neopixels: Arduino library performance or other issue wi

by adafruit_support_bill on Tue Dec 17, 2019 5:40 pm

There is some slight memory overhead for each logical strand. But it is minor compared to the memory requirements for the pixels themselves.

As far as pixel update performance goes, it should not be an issue.

Coordinating different patterns on different strips concurrently is another story.
https://learn.adafruit.com/multi-taskin ... ino-part-3

adafruit_support_bill
 
Posts: 76233
Joined: Sat Feb 07, 2009 10:11 am

Re: Neopixels: Arduino library performance or other issue wi

by dremu on Tue Dec 17, 2019 5:55 pm

Good info, and mm, fair point on the animation. Thankfully the driving inputs change very slowly, so might be able to avoid using interrupts and stick with digitalRead. If not, I have reading up to do.

Thanks!

-- A

dremu
 
Posts: 2
Joined: Mon May 28, 2012 7:28 pm

Please be positive and constructive with your questions and comments.