multiple LED strips (WS2812) on different pins

Hallo

I am a new arduino user and I need somehelp with my project

I wrote a sketch, but it does not work properly. when I use my sketch, all LEDs will blink white.

I use 7 Ledstrips (WS2812) on several pins of my arduiono Nano.
all LED strips use about 25 LEDs. but for my test I temporarily use 4 LEDs

the 1st LEDstrip I would like to blink white light.
the 2nd LEDstrip I also want to blink white light only when the 1st LEDstrip is off, and vice versa.

I want the 3nd LEDstrip to be constantly RED, and on the 4th LEDlight I want to be constantly GREEN.

the 5th, 6th and 7th LED strip I want whitelight with different pause times

what I am doing wrong and who can help me with this.

#include "FastLED.h"

#define NUM_LEDS 4
#define NUM_STRIPS 7

CRGB leds[NUM_LEDS];
CLEDController *controllers[NUM_STRIPS];
uint8_t gBrightness = 100; //full brightness = 128

void setup() {
controllers[0] = &FastLED.addLeds<WS2812,2>(leds, NUM_LEDS); // strip 1 on pin 2
controllers[1] = &FastLED.addLeds<WS2812,3>(leds, NUM_LEDS); // strip 2 on pin 3
controllers[2] = &FastLED.addLeds<WS2812,4>(leds, NUM_LEDS); // strip 3 on pin 4
controllers[3] = &FastLED.addLeds<WS2812,5>(leds, NUM_LEDS); // strip 4 on pin 5
controllers[4] = &FastLED.addLeds<WS2812,6>(leds, NUM_LEDS); // strip 5 on pin 6
controllers[5] = &FastLED.addLeds<WS2812,7>(leds, NUM_LEDS); // strip 6 on pin 7
controllers[6] = &FastLED.addLeds<WS2812,8>(leds, NUM_LEDS); // strip 7 on pin 8

}

void loop() {

controllers[0]->showLeds(gBrightness); //Ledstrip 1 (WS2812) blinking opposite from strip 2
// Turn the LED on, then pause
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(500);

/////////////////////////////////

controllers[1]->showLeds(gBrightness); //Ledstrip 2 (WS2812) blinking opposite from strip 1
// Turn the LED on, then pause
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(500);

/////////////////////////////////////////////

// draw led data for the 1 strand into leds //ledstrip 3 (WS2812) constand on Red
fill_solid(leds, NUM_LEDS, CRGB::Red);
controllers[2]->showLeds(gBrightness);

/////////////////////////////////////////////

// draw led data for the 2 strand into leds //ledstrip 4 (WS2812) constand on Green
fill_solid(leds, NUM_LEDS, CRGB::Green);
controllers[3]->showLeds(gBrightness);

/////////////////////////////////////////////

controllers[4]->showLeds(gBrightness); //Ledstrip 5 (WS2812) blinking
// Turn the LED on, then pause
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
FastLED.show();
delay(1500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(1500);

/////////////////////////////////////////////

controllers[5]->showLeds(gBrightness); //Ledstrip 6 (WS2812) blinking
// Turn the LED on, then pause
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
FastLED.show();
delay(800);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(800);

///////////////////////////////////////////

controllers[6]->showLeds(gBrightness); //Ledstrip 7 (WS2812) blinking
// Turn the LED on, then pause
leds[0] = CRGB::White;
leds[1] = CRGB::White;
leds[2] = CRGB::White;
leds[3] = CRGB::White;
FastLED.show();
delay(300);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(300);

}

FastLED.show();

Is the problem.
You use the method defined by the instance you declared like:-

controllers[0].show();

hallo

thanks for de reply.

but Im a new user of arduino and I dont understand what you mean.
please can you explain what you mean in my sketch.

greetings from Holland

Double-U:
Hallo

I am a new arduino user and I need somehelp with my project

I wrote a sketch, but it does not work properly. when I use my sketch, all LEDs will blink white.

I use 7 Ledstrips (WS2812) on several pins of my arduiono Nano.
all LED strips use about 25 LEDs. but for my test I temporarily use 4 LEDs

the 1st LEDstrip I would like to blink white light.
the 2nd LEDstrip I also want to blink white light only when the 1st LEDstrip is off, and vice versa.

I want the 3nd LEDstrip to be constantly RED, and on the 4th LEDlight I want to be constantly GREEN.

the 5th, 6th and 7th LED strip I want whitelight with different pause times

what I am doing wrong and who can help me with this.

#include "FastLED.h"

First off use the code tags when posting code.

What is it you are exactly trying to do?

What libraries are you using?

a 5 volts 6 amp power supply is not large enough to power 7 led strips of 25 LED per strip.

I would suggest looking at AllPixel boards.
They are made to control LED Strips. The programming is in Python.

artisticforge:
What libraries are you using?

Did you actually read the code that was posted. The first line is:-
#include "FastLED.h"
Does that not give you a clue?
Your post just looks like a spam advert.

Double-U:
Im a new user of arduino and I dont understand what you mean.

So that means you did not write that code. It is using very advanced concepts for a beginner, especially one who claims not to know what I mean.
You have the same LED array for all strips.
So be honest, where did that code come from?

Grumpy_Mike:
Did you actually read the code that was posted. The first line is:-
#include "FastLED.h"
Does that not give you a clue?
Your post just looks like a spam advert.
So that means you did not write that code. It is using very advanced concepts for a beginner, especially one who claims not to know what I mean.
So be honest, where did that code come from?

No spam, just suggesting an alternative to the library that he is using.
I did not recognize the library and had to look it up.

I also had come to the conclusion that the code posted was not written by the poster, given that the poster stated that they were new to arduino.

I had to lookup some of the syntax used in the posted code. I still do not understand some of the syntax.

In rereading the original post, it is not clear if there are 25 LED total or that there are 7 strips of 25 LED each, for a total of 175 LED. Given that they are using an Arduino Nano I am going to assume that it is 25 LED total across 7 strips.

I have been working on getting 900 LED, 3 300LED strips, working.
It appears that the 5 volts 40 amp power supply is not enough, since getting "brown" outs at the last 200 LED.
I ordered the AllPixel as an alternative approach.

Grumpy_Mike:
Did you actually read the code that was posted. The first line is:-
#include "FastLED.h"
Does that not give you a clue?
Your post just looks like a spam advert.
So that means you did not write that code. It is using very advanced concepts for a beginner, especially one who claims not to know what I mean.
You have the same LED array for all strips.
So be honest, where did that code come from?

I used this code from the internet and made adjustments to it. it is forbidden to use these codes?

hello

I would suggest that you start with a simple circuit and work up.
You need to get some experience with the Arduino hardware, software and programming.

It is fine to use code from examples, but you need to understand the code to use it correctly.
The code you posted I do not fully understand and I have been doing electronics many decades.
B.S.E.E. many decades ago.

I would have to download FastLED libraries and "play" with them to understand them.
Right now I do not have that time.

Instead of 7 LED strips start with 1 LED Strip.
Learn how to control the LED on 1 strip.
Then add a 2nd (second) LED strip to the circuit.
Build up to the final project goal.

As your learn progress to more advanced projects.
Jumping into Arduino and complex projects is just going to frustrate you.

I used this code from the internet and made adjustments to it. it is forbidden to use these codes?

No but you pretended that you wrote it which is bad form.

That link is not to a specific code example but to the discussion tutorial page. You should have posted the original code you used.

Now did the original code work? Did it only stop working after you made the changes?

We need to know these things in order to try and track down what you have wrong because we have not got the equipment in front of us.

Hallo

thank you all for the good advice. I will start with a simple code first and work it out further

So not interested in answering questions? So not interested in any help from me then.
You are a time waster.