I just started using FastLED (just started working w/Arduino,

I just started using FastLED (just started working w/Arduino, actually) and I’m working with the cheap Radio Shack TM1803 based strips. I’ve got a few that I’d like to be able to connect to different data pins and show different patterns. I have started screwing with the Cylon.ino example sketch and I defined two variables for data pins, “DATA_PIN_STRIP1 11, and DATA_PIN_STRIP2 10”, and when I duplicate the FastLED.addLeds line, referencing the two pin definitions in each. This, obviously gives me the same output on both pins 10 and 11. That’s where I hit the wall.

I’m new to Arduino/Wiring so go easy on me :slight_smile:

So, in the addData lines - notice where each strip is passed a reference to leds and counts? The same set of led data (leds) is being given to both strips.

So, if instead you do something like this:

CRGB leds1[NUM_LEDS];
CRGB leds2[NUM_LEDS];

setup() {
LEDS.addLeds<TM1803, DATA_PIN_STRIP1>(leds1, NUM_LEDS);
LEDS.addLeds<TM1803, DATA_PIN_STRIP2>(leds2, NUM_LEDS);
}

void loop() {
// First slide the led in one direction
for(int i = 0; i < NUM_LEDS; i++) {
// Set the i’th led to red
leds1[i] = CRGB::Red;
leds2[i] = CRGB::Blue;
// Show the leds
FastLED.show();
// now that we’ve shown the leds, reset the i’th led to black
leds1[i] = CRGB::Black;
leds2[i] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(30);
}

// Now go in the other direction.
for(int i = NUM_LEDS-1; i >= 0; i–) {
// Set the i’th led to red
leds1[i] = CRGB::Red;
leds2[i] = CRGB::Blue;
// Show the leds
FastLED.show();
// now that we’ve shown the leds, reset the i’th led to black
leds[i] = CRGB::Black;
leds[i] = CRGB::Black;
// Wait a little bit before we loop around and do it again
delay(30);
}
}

Now you should see one strip with red and the other with blue.

Hope this helps with getting started!

you need to make a second FastLED class and call its add leds method. two “leds” arrays, two fast led classes, two distinct patterns.

No second class, LEDS can handle having multiple controllers in it (you may be thinking too much of the preview releases, before I got the central controller written).

Great, thank you Daniel, I think that is exactly what I need. I wil have a chance to implement the suggested edits soon and if I have further difficulty I will let you know.

From what I have seen so far with FastLED, it is a far superior method of talking to the Radio Shack strip than even the example method and code supplied by Radio Shack. I’m sure anyone familiar with this product can attest to the ridiculously poor quality of what the manufacturer supplied insofar as software, and I’m really happy to find FastLED.