WS2811 Multiple Strips, Different Colour

Hi all, I’m a newbie in arduino. Currently, i’m working for my final year project. I have 3 led strips hooked to a single arduino Uno board. How can I change the color for each strip differently? I mean for the 1st strip is blue, 2nd is green, and 3rd is red. I pasted together the code here.

Hope that someone can help me out as I’m totally helpless when it comes to programming.

#include <Adafruit_NeoPixel.h>
#include <TM1637Display.h>

#define CLK_a 2 //Set the CLK pin connection to the display
#define DIO_a 3 //Set the DIO pin connection to the display
#define CLK_b 8 //Set the CLK pin connection to the display
#define DIO_b 9 //Set the DIO pin connection to the display

int NumStep_a = 0; //Variable to interate
int NumStep_b = 400; //Variable to interate

TM1637Display display_a(CLK_a, DIO_a); //set up the 4-Digit Display.
TM1637Display display_b(CLK_b, DIO_b); //set up the 4-Digit Display.

#define PIN_5 5
#define PIN_6 6
#define PIN_7 7
#define NUM_LEDS 60

// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic ‘v1’ (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)

Adafruit_NeoPixel strip_a = Adafruit_NeoPixel(NUM_LEDS, PIN_6, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip_b = Adafruit_NeoPixel(NUM_LEDS, PIN_7, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip_c = Adafruit_NeoPixel(NUM_LEDS, PIN_5, NEO_GRB + NEO_KHZ800);

void setup()
{
strip_a.begin();
strip_b.begin();
strip_c.begin();
strip_a.show(); // Initialize all pixels to ‘off’
strip_b.show();
strip_c.show();
display_a.setBrightness(0x0a); //set the diplay to maximum brightness
display_b.setBrightness(0x0a); //set the diplay to maximum brightness
for(NumStep_a = 0; NumStep_a < 156.0; NumStep_a++) //Interrate NumStep
{
display_a.showNumberDec(NumStep_a); //Display the Variable value;
delay(10); //A half second delay between steps.
}
for(NumStep_b = 400; NumStep_b < 654.0; NumStep_b++) //Interrate NumStep
{
display_b.showNumberDec(NumStep_b); //Display the Variable value;
delay(0); //A half second delay between steps.
}

}

// *** REPLACE FROM HERE ***
void loop() {
theaterChase(0xff,0,0,150);
}

void theaterChase(byte red, byte green, byte blue, int SpeedDelay) {
for (int j=0; j<10; j++) { //do 10 cycles of chasing
for (int q=0; q < 3; q++) {
for (int i=0; i < NUM_LEDS; i=i+3) {
setPixel(i+q, red, green, blue); //turn every third pixel on
}
showStrip();

delay(SpeedDelay);

for (int i=0; i < NUM_LEDS; i=i+3) {
setPixel(i+q, 0,0,0); //turn every third pixel off
}
}
}
}
// *** REPLACE TO HERE ***

void showStrip() {
#ifdef ADAFRUIT_NEOPIXEL_H
// NeoPixel
strip_a.show();
strip_b.show();
strip_c.show();
#endif
#ifndef ADAFRUIT_NEOPIXEL_H
// FastLED
FastLED.show();
#endif
}

void setPixel(int Pixel, byte red, byte green, byte blue) {
#ifdef ADAFRUIT_NEOPIXEL_H
// NeoPixel
strip_a.setPixelColor(Pixel, strip_a.Color(red, green, blue));
strip_b.setPixelColor(Pixel, strip_b.Color(red, green, blue));
strip_c.setPixelColor(Pixel, strip_c.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();
}

Your setPixel function is setting all three strips to the same colour. I am sure that is not what you want to do.

Why all the conditional compiling crap with the fast led libiary? Remove it.

I don't :confused: know :confused: if you can do this with the adafruit library, but you can with FastLED

I don't if you can do this with the adafruit library,

Yes you can.