Hello, been away from microcontrollers and RGB light projects for while now and recently

Hello,

been away from microcontrollers and RGB light projects for while now and recently asked to build an improved version of a lamp I made with Arduino UNO and 8 strips of 25 WS2812.

My original sketch used an array of led arrays where the leds arrays were defined by…

CRGB leds[NUM_STRIPS][NUM_LEDS_PER_STRIP];

and the controllers with…

FastLED.addLeds<NEOPIXEL, 11>(leds[0], NUM_LEDS_PER_STRIP);
FastLED.addLeds<NEOPIXEL, 12>(leds[1], NUM_LEDS_PER_STRIP); etc… etc…

This time I want to use a Teensy 3.1with it’s OCTOWS2811 adapter (I have both on hand) and a lot more WS2812 leds. I want to benefit from the parallel output but also want to reuse my original sketch with minimum adaptations if possible !

The way I have used the Teensy in the past always used the single array multiple strips method such as…

LEDS.addLeds<OCTOWS2811, RGB>(leds, NUM_LEDS_PER_STRIP);

Is it possible to define an array of led array using the Teensy ? How??

Sorry if this is a silly question or if it lacks required details. Thanks for any suggestions.

Hmmm… my question is probably not clear.

I will ask it differently…

Is it possible to use the Teensy 3.1 with the OCTOWS2811 adapter with FastLED and have 8 ways parallel output while defining the leds in an array of arrays such that I can set LEDs data with something like…

leds[horizontal][vertical] = CRGB(r,g,b);

I’m not sure, you might have to set up two arrays of LEDs. One as a normal array as in the parallel output examples and one x,y one as you want it and then copy the data across before calling show…

Or a piece of code to convert x,y coordinates into an integer

Hi @Jeremy_Spencer , thanks for the suggestion.

I had already figured that one out. I have to replace…

leds [h][v] =

with…

leds [h*numledsperstrip + v] =

Call me lazy but I would have to modify everywhere (quite a few places actually) in an old sketch where I modify LED data and was just hoping I could use something like…

LEDS.addLeds<OCTOWS2811, RGB>(leds[0], NUM_LEDS_PER_STRIP);
LEDS.addLeds<OCTOWS2811, RGB>(leds[1], NUM_LEDS_PER_STRIP); etc… etc…

or something similar but I am guessing that is not possible and I will have to do it the hard way…

Thanks again !!