Hi,
I am using the NeoPixel library and I currently have 5m of the 96 leds / m strip of neopixels. My question is if I can connect all of their data lines together and, in my sketch, say the strip length is 96 * 5 = 480 pixels per strip, or if there is some sort of maximum. Make one long strip would make it easier for my sketch, which is why I want to do it this way. Thanks
Maximum NeoPixels Driven by one pin?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Maximum NeoPixels Driven by one pin?
The maximum is limited only by memory. It takes 3 bytes per pixel of SRAM. An UNO has 2K of SRAM some of which is also needed for the program stack and other variables. A Mega has 8K.
-
- Posts: 5
- Joined: Sat Sep 07, 2013 7:32 am
Re: Maximum NeoPixels Driven by one pin?
So distributing the strips among different pins would have no effect on this RAM consumption correct? (i.e. it does not help to spread them out)?
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Maximum NeoPixels Driven by one pin?
No, that does not help. It still takes 3 bytes per pixel.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Maximum NeoPixels Driven by one pin?
There may be a few bytes more overhead associated with each additional strip. But the 3-bytes per pixel is constant, no matter how you divide them up.
-
- Posts: 5
- Joined: Sat Sep 07, 2013 7:32 am
Re: Maximum NeoPixels Driven by one pin?
And the most probable way to get more RAM is to get another microcontroller?
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Maximum NeoPixels Driven by one pin?
Yes. The UNO has 2K, Leonardo has 2.5K and the Mega has 8K. Others like the Teensy 3.1 have enough memory to drive thousands if needed: https://www.pjrc.com/teensy/td_libs_OctoWS2811.html
Please be positive and constructive with your questions and comments.