So, I'm trying to find a way to modify some of my functions so

So, I’m trying to find a way to modify some of my functions so that I can easily reuse them. I’m working on a project where I will be using multiple arrays of leds, outputting on multiple pins.

I’m having trouble understanding how to pass or reference my Array of RGB values into the function so that I can modify them. This way, I can tell the function which array I’m modifying, and not have to have separate functions for each array. I’ve googled around some tutorials but haven’t had much luck. I figured somebody here must have done it before, considering the nature of the library.

in case you are curious, the reason this isn’t contained within a for() loop is because I must be able to animate different sets of lights at the push of different buttons, so there is a “current pixel” variable for each strip to keep track of the state of the different animations.

Here is a link to my code:
http://pastebin.com/507A8tAf

Ah, I forgot, I should also post how the function is called:

Tracker1 = AnimateMarquee(leds1, END1, Tracker1, HUE1, SAT1);

also the error I receive with my current code is this:
"cannot convert ‘CRGB*’ to ‘int*’ for argument ‘1’ to AnimateMarquee(int*, int, int, int, int)

Okay - modifying the datatype in the function to CRGB instead of int appears to allow it to compile, but I’m not seeing output.

What does your array instantiation look like? And the addLeds statement?

Here is the Array Statements:

//Define Pixel Arrays
#define ARRAY1_SIZE 300 //LEDS output on First Data Pin
#define ARRAY2_SIZE 64 //LEDS output on Second Data Pin
CRGB leds1[ARRAY1_SIZE];//Create array for RGB LED Control
CRGB leds2[ARRAY2_SIZE];

And here is what happens in the setup loop:
//Other Actions
FastLED.addLeds<NEOPIXEL, DATA1_PIN>(leds[1], ARRAY1_SIZE);
FastLED.addLeds<NEOPIXEL, DATA2_PIN>(leds[2], ARRAY2_SIZE);

I had the idea of using an Array of Arrays, but this would eat up memory really fast, especially I generally have 1 very large array, and then several smaller ones. I would keep them within a singular array, but physical location will be a barrier on this.

Your “addLeds” statements are the problem. They should read:

FastLED.addLeds<NEOPIXEL, DATA1_PIN>(leds1, ARRAY1_SIZE);
FastLED.addLeds<NEOPIXEL, DATA2_PIN>(leds2, ARRAY2_SIZE);

As is, you’re assigning them to the second and third elements of a non-existent array.