I’ve been splitting my LED arrays over multiple pins to keep each pin under 300 pixels or so, simply by defining multiple arrays in the code and then assigning my pixels to the appropriate array as part of my XY mapping.
I was reading a comment in another thread and Dan mentioned that this isn’t truly parallel output the way FastLED supports it.
Can anyone who knows more than I do about the under the hood process of writing data to the LEDs help me understand the difference between:
and just defining several LED arrays, each on different pins
The latter works fine for me, but as I understand it it isn’t actually parallel output. And it works fine for 1k LEDs. but maybe it won’t for 4k? And if my pins all drive different amounts of LEDs will the true parallel output implementation prove difficult?
I think you are mixing ‘parallel output’ and using multiple pins.
Then link that Marc provided explains that Parallel output is only possible on a small number of platforms like the Teensy, the Due and the Digix. I think that the ESP-8266 also supports parallel output but the wiki page has not been updated with that info.
@JP_Roy well… yes exactly I’m asking specifically because I want to understand better the true difference between parallel output and using multiple pins. I know that they’re not the same thing, but I guess I’m not 100% clear on WHY they’re not the same thing, and I’m curious as to exactly what the limitations of “using multiple pins” is, and how parallel output will be better
I’m using an ESP 8266 now. Was using a Teensy-LC previously
Hi @chad_steinglass , I have used both parallel output and multiple pins in different projects.
With multiple pins, when you do a Fastled.show() each pin outputs its associated data in sequence. The main advantage of this ( I think… ) is to simplify wiring such that you do not need to connect the end of a strip to the beginning of another. In fact, as per discussion I had with Daniel Garcia this is slightly less efficient than using a single pin for all your LEDs as there is some additional processing to switch the LED data between the pins.
@JP_Roy Thanks - this is exactly the info I was looking for. So any perceived improvement I was getting from simply using multiple pins was probably due entirely to upgrading controllers (from nano to teensy/8266) and not at all from dividing up the LEDs. Or maybe some placebo effect!
Sounds like I need to start using parallel output if I want to keep FPS over 30 or so for bigger projects. So learning how to code and wire my controllers for that will be my weekend project this weekend
@chad_steinglass Also just picked up on the issue of having different number of LEDs on each pins of a ‘true’ parallel output setup.
I have not tried it but guess that you would simply have to define your LEDs array to the longest string. That would waste some memory but may or may not be an issue !?
@JP_Roy re: different number of LEDs per strip - yeah, I figure that’s probably what I’d have to do. Thankfully, with the ESP8266 memory problems are a thing of the past!
Its like night and day compared to trying to eek out every last byte on the nano
I imagine it will take a bit of trial and error for me to figure out which pins are the right ones for different board configurations (the D1 mini will probably be my go-to, but that’s not the same board that I have for my breadboard prototyping) as well as figuring out which order they need to be in (for example - if I’m only using 3 pins, I imagine that I have to use the first 3?)
@Yves_BAZIN I built an 8X8X8 cube around a Teensy 3.1 and the OCTOWS2811 adaptor. That is the only platform that I used with parallel output. Not familiar with any other platforms for parallel.
But… just now received a couple of WeMos D1 Mini Pro ESP8266 and will play with them in the coming weeks
@Yves_BAZIN Nice work! I’m just getting started on parallel output, starting with the 8266 before jumping into the ESP32… But I’m having a tough start - I can’t even find a good example of how to declare my strips… I can’t get anything to compile because of a “WS2811_PORTA not declared in this scope” error.
Think you could throw me a tip to get me started in the right direction?
@chad_steinglass I am using the latest 1.8 version (it worked also for 1.6 of fastLed )
i am declaring
FastLED.addLeds<WS2811_PORTA,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP);
and I use Node MCU 1.0 (ESP12E) as a board and it compiles.
what is the version of your fastled library ?(you need to have at least 1.6 for parallel output on the 8266.)
PS: the fasted 1.8 will not work for parallel output on the esp32
@Yves_BAZIN Turns out I was just being sloppy and hadn’t changed my board to the ESP12E from my last project on a nano, and didn’t realize it because I was just verifying code and hadn’t even tried to plug in a prototyping board yet. Works like a charm as soon as you helped me realize that. Thanks!
@Yves_BAZIN Thanks! I spent the day today getting everything working. I found lots of interesting issues that popped up when using parallel output that didn’t show themselves using serial.
First, the length of my control cable mattered, shorter being better obviously. Also, I had 3 different outputs, and any two would work fine but as soon as I added the third it would get crazy flicker. Lastly, I also found that not all strips are created equally, and some of my rows were of a lower quality manufacturer - I had to insert a few “good” pixels in in a couple places as signal boosters.
Lastly I also played with the timing definitions and made a slower signal for the 2812Bs as Tom L had posted a few weeks ago
All of those things together and I got my 1k pixel playa coat running smoothly. Will post vids sometime soon
@chad_steinglass happy to hear !! How many led per strip do you have ?
Could you show me where you increase the timing of the 2812b ? I haven’t seen that post. Waiting for your video !!
@Yves_BAZIN I have it split into about 350 LEDs per strip, which is really per section (divided the jacket up into a left, back, and side panel). The back panel has about 10 fewer pixels than the side panels, so I just had to skip over the nonexistent pixels when doing my XY mapping, since FastLED needs the same number of pixels in each strip for parallel output.
My frame rate isn’t amazing because its still 350 pixels and my code is probably pretty sloppy still, and because I slowed down the data cycle of the pixels. Tonight maybe I’ll try to optomize that and see how fast I can get it before I start to get flicker again.
Here’s the post I was talking about - really helpful to get to understand exactly how the chips work. Down towards thee end of the comments