Hi Anyone know how to work with 2 different led arrays using Fastled ?

Hi
Anyone know how to work with 2 different led arrays using Fastled ?
for example :

CRGBArray<NUM_LEDS> leds;
CRGBArray<NUM_LEDS> mleds;

then during setup

FastLED.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);

In the loop i want to do a very simple operation but it wont work somehow

static uint8_t hue = 0;
mleds(8, NUM_LEDS - 1).fill_rainbow(hue++);
leds[0] = mleds[0];

I was expecting the first led to light up but it doesnt, did i do something wrong ? Please help

Do you have a Fastled.show(); after this?

Here is the piece of code

#include “FastLED.h”
#define LED_DT 2
#define COLOR_ORDER RGB
#define LED_TYPE WS2812B
#define NUM_LEDS 300
#define FPS 120

uint8_t max_bright = 255;
CRGBArray<NUM_LEDS> leds;
CRGBArray<NUM_LEDS> mleds;

void move();

void setup() {
FastLED.addLeds<LED_TYPE, LED_DT, COLOR_ORDER>(leds, NUM_LEDS);
FastLED.setBrightness(max_bright);
FastLED.setMaxRefreshRate(FPS);
set_max_power_in_volts_and_milliamps(5, 500);
}

void loop() {
EVERY_N_MILLISECONDS(1000/FPS) {

	move();

	FastLED.show();
}

}

void move() {
static uint8_t hue = 0;
mleds(8, NUM_LEDS - 1).fill_rainbow(hue++);
leds(0, 1) = mleds(0, 1);
}

Just glancing at this, do you mean:to use index of 0, not 8?

mleds(0, NUM_LEDS - 1).fill_rainbow(hue++);

You’re right it should be 0 instead of 8 :smiley: Thanks couldnt believe i missed that :smiley: