I recently purchased a 5M strip of digital RGB LEDs, that is compatible with the "Adafruit_NeoPixel.h" library.

Is maintaining the original order of the LEDs important? Could I cut the strip in say four sections, and then reconnect those sections out of their original order?

Just to be clear these are digital 3-pin(+5V,DI,GRN) strips, not analog 4-pin(+12V, R, G, B) strips.

I'm just not finding good info regarding if the individual LEDs are pre-assigned an ID by the manufacturer, or if they somehow use a serial-timing way to assign IDs at startup.

Before digging through the Adafruit_NeoPixel.h, I wanted to see if I could get a quicker answer here.



I can not find detailed information regarding the 5M LED strips you bought.

I have used Adafruit addressable LED strips. What Adafruit publishes on their web site helped a great deal when I cut my strips into smaller sizes.

Here is an Adafruit image which may help you:

enter image description here

I would think the order does not matter. But you do need to connect the data such that "outs" go to "ins". And you need to connect them in a row. That is you need to connect them in one loop.

Added later...

Assuming we are using the WS2812:

enter image description here

We know from the specifications that the RGB data is encoded as 3 8 bit NZR (Non Zero Return) pulses. 8 bits for each color: red, green & blue. That there is 1 such "word" of 24 bits for each pixel. That the beginning of a set of "words" is marked by a 50us or grater interval where DI is zero. And that each pixel strips off the first 24 bit "word" before passing the balance of the data on.

In other words, it doesn't matter what order WS2812 are assembled in. Also that WS2812 have no idea where they are in the sequence. All that matters is that each succeeding WS2812 gets its data from the previous WS2812.

One last note. The necessary timing is really fast and really tight. Can't be more than 150 billionths of a second off. No way can a multitasking platform like a PC, Mac or RaspberryPi pull this off. When sending off a set of "words" to a string of pixels, the embedded processor will likely not be doing anything else!

| improve this answer | |
  • I think "ins" and "outs" is confusing, as there really is only one data connector, it's just that when connecting one strip to another you must maintain the +5V and GND polarity, from one strip to the next. – ZacWolf May 7 '16 at 1:45
  • I do not think, for example, connecting a DIN pin to a DIN pin will work. Look at the picture. Look at the silk-screen around the soldered strip connection. Further, I think the data going into the DIN pin is altered by the NeoPixel's controller chip before coming out of the DOUT pin. I believe this is the technique that the NeoPixels use to self address. Hence why I believe you can connect them in any order. But only in series. Not in parallel. – st2000 May 7 '16 at 3:29
  • I get what you're saying, but most of the strips I've seen are not labeled DIN and DOUT; just DI. So really the important part is as long as you keep the GRN connected to GRN and +5V connected to +5V, the digital connector will take care of itself. That is a fair point about connecting strips in parallel, that would not work because the addressing is done via serial bit-shifting. – ZacWolf May 7 '16 at 12:00
  • I STAND CORRECTED! There is a DI and a DO, so the "DI" needs to be the "beginning" of the strand(s). Could you incorporate the serial-shifting-register information from the duplicate post, and I'll then select your answer? – ZacWolf May 7 '16 at 19:38
  • I can do that. But after looking over the translated specification, I would have to disagree with the duplicate answer and say the first 24 bits is used by the first pixel. Think about it, how could the 1st pixel use and strip off the last 24 bits as it has no idea how long to wait. This is, it has no idea how many pixels are being addressed. There is no address information in the data stream. It is all brightness levels. – st2000 May 7 '16 at 23:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.