I'm trying to decide on the best setup in the code for my current

(Brian Vanderbusch) #1

I’m trying to decide on the best setup in the code for my current neopixel project. I have 8 rows of 20 WS2812b’s,

The middle 6 rows will serve as a moving color wheel (think wheel of fortune). This row will only move one direction.

The top and bottom row will serve as the color selector, and it will move back and forth in a cylon pattern.

The whole animation will be started with a big start button, and stopped with a big stop button. The speed of both animations will be controlled by potentiometers.

(see attached video for prototype)

I have a teensy 3.6 and an arduino Due on hand, and am considering the best way to make use of parallel output to be able to achieve a good combination of fast fps and simple code in the loop().

this is my first time using FastLED, and I can’t decide how many pins/arrays of LED’s I should create.

Any recommendations?

Originally I was going to create 2 arrays in the code, but I’m wondering if there’s a better combination of arrays and mirroring to take advantage of either for simplicity or performance.

(Thomas “Balu” Walter) #2

I have the same decision to make, but with an ESP32 and a 18x16 matrix plus another row of 60 leds :slight_smile:

(Brian Vanderbusch) #3

@Thomas_Balu_Walter I’ll let you know what I go with. I think I’m going to try the WS2811_PORTD controller. Do you know what Port manipulation is available for the esp32? I swear I saw a video of parallel output on the esp32 somewhere.

(Brian Vanderbusch) #4

You can follow along with whatever I decide in my code here: https://github.com/LongLiveCHIEF/spin_to_win

(Marc MERLIN) #5

160 pixels is not a lot, you don’t need parallel output for that. Any Arduino will run this. Your two options are totally overkill and will do the job fine :slight_smile:

(Brian Vanderbusch) #6

@Marc_MERLIN I was considering doing two mirrored arrays, but I went with the parallel output option because I need interrupt ability for the speed controllers. I thought I had to use direct port manipulation built into FastLED in order for interrupts to be enabled while led data is being written.

(Marc MERLIN) #7

Interrupts and parallel output are different. It’s fine to use parallel output if you’d like, just not necessary for 160 leds

(Brian Vanderbusch) #8

@Marc_MERLIN The other thing I’m trying to do is get a left to right “scrolling” speed that is very high. When I tried various numbers of LED’s on the arduino, it was ultimately too slow even without any delay’s.

By switching down to ~80 LED’s total on one line, I’m getting the speeds I want. But my matrix needs to be at least 20 pixels wide and 8 pixels high. By using parallel output, I’m able to get the scrolling speeds i want on all 8 strands.

(Brian Vanderbusch) #9

I know that can be done using port manipulation on the arduino, but I haven’t seen where FastLED supports WS2811_PORTD controller on Arduino.

(Marc MERLIN) #10

I think 256 LEDs is 100fps without parallel output, no? Anyway parallel output is controller dependent https://github.com/FastLED/FastLED/wiki/Parallel-Output

(Brian Vanderbusch) #11

…which is why I switched from arduino to teensy.

(Marc MERLIN) #12

note that “arduino” doesn’t mean much :slight_smile: there are plenty of so called arduino chips that are not 328p which I believe is what you were referring to. Anyway read the parallel output page and it’ll tell you what you need for a the few chips that support it, although I’m still a bit perplexed that you’re not getting at least 100fps with serial output.

(Brian Vanderbusch) #13

I think I was getting way more than 100fps. It was the speed to the human eye moving a pixel from right to left that was too slow. I wasn’t using FastLed at the time, so not sure of the fps I was getting.

I’ve gone over that parallel output page dozens of times in the last week, and pored over all the code in the library itself.

I’m just new to cpp in addition to elec engineering, so I appreciate you sticking with this convo and making sure I’m not going astray.

I may not need the parallel output, but I’ve found I think what will work for me using parallel output and CRGBArray, making it super simple to work with the loop with CRGBSets. Link to specific commit below.

(Brian Vanderbusch) #14

@Marc_MERLIN your blogs and libraries have been a huge help as I’ve gone about learning all this. Thank you.

(Marc MERLIN) #15

@Brian_Vanderbusch glad it helped, good luck with your project