1
\$\begingroup\$

I have a 3 meter WS2812B strip that I want to connect to a NodeMCU in a very specific way.

I want to cut the strip down to six 20 cm segments but I don't want the animations to "snake" from one to the next. I want each 20 cm length to start the animations at its respective 1st LED and have all six lengths move in unison.

Can someone overview the process for me?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I voted to reopen; the question seems pretty focused to me. I re-worded the terrible title which may have contributed to closure. \$\endgroup\$
    – JYelton
    Aug 15, 2023 at 19:10

3 Answers 3

0
\$\begingroup\$

I think you've misunderstood how these LED strips work. They don't automatically perform "snake" animations. You have to send the RGB (actually GRB) pixel values for each LED separately.

The datasheet specifies how this is done:

enter image description here

enter image description here

The first LED (D1) consumes the first 24-bit value, and outputs all of the remaining data bits. The second LED (D2) then consumes the next 24-bit value and outputs the remaining data bits. This is continued until all data bits are consumed, or up to the final LED in the chain.

\$\endgroup\$
0
\$\begingroup\$

3 ways to do this.

  1. Use multiple outputs. Each string would connect to a data pin and the nodemcu would drive the same data to each pin/string. If you have enough ram or pins you can use for data. Ie. 123
    123
    123

  2. Copy the data every N leds. The strings would still be connected in series, end to end, and you are sending the same led data after every n * x count. Simplest code plus some annoying wiring. Ie. 123123123

  3. Connect the strings in parallel to a single data pin. Take advantage of the way the data is sent, since these addressable leds don't have fixed addresses, just sequential numbering. You can connect them in parallel and they should pick it up without issue. When you do this sometimes you need to use a sacrificial led at the beginning as a buffer IC. Minimal change to code except for accounting for a buffer led. N+1

\$\endgroup\$
0
\$\begingroup\$

Wire the 6 strips in parallel - that is connect the input data in pin of each strip together.

That way the all get the same signal ans all display the same animation.

To software the 6 20cm strips will be indistinguishable from a single 20cm strip.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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