@chenjaye - would you be able to attach the code you're trying to compile?
At first glance I see there is no index used with the "leds" array.
For example:
leds = CRGB(red, green, blue);
Should be something like:
leds[i] = CRGB(red, green, blue);
Since I'm not aware of the context code, you'll have to find what "i" should be, most likely you are looking at these 2 functions:
void setPixel(int Pixel, byte red, byte green, byte blue) {
#ifdef ADAFRUIT_NEOPIXEL_H
// NeoPixel
strip.setPixelColor(Pixel, strip.Color(red, green, blue));
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
// FastLED
leds[Pixel].r = red;
leds[Pixel].g = green;
leds[Pixel].b = blue;
#endif
}
void setAll(byte red, byte green, byte blue) {
for(int i = 0; i < NUM_LEDS; i++ ) {
setPixel(i, red, green, blue);
}
showStrip();
}
Where the setAll function has been changed.
Tip:
Since you're using FastLED, the setAll() function, you can optionally replace the "setAll()" function with the build in "fillSolid" function from the FastLED library (probably faster as well).
Example, instead of calling
setAll(red,green.blue);
you could do this (and skip the entire "setAll()" function definition in your code):
fill_solid ( leds, NUM_LEDS, CRGB(red,green,blue) );
Hope this helps.