simultaneous theater chase on one strip

hey all,

I'm currently setting up theater chase on a makeshift led board, I have 5m 60led/m and like, they're basically arranged in rows one on top of the other? I hope that explains it well.

I have some shoddy code I've been messing with to see how to achieve the affects I want but one thing is escaping me. I can paste the code if it's deemed necessary, but its not that my code won't work, it's that I'm not sure how to do this or if it can be run.

Just for the sake of this, I'll say row #1 is leds 1-60 and row #2 is leds 70-130. Theres space over the sides where the led curves to go backwards the other way.

What I'm having trouble with is having #1 and #2 light up at the same time as possibly two separate colors without the in between space being lit. I haven't figured out how to do it within the same theaterChase definition, other times I introduce a theaterChase1 for #2 but it ends whatever pattern it follows.

Can I run two theaterChase patterns at once, or possibly split the integers within one pattern so that some space is never lit?

I really appreciate it.

You haven't shown us any code and you haven't told us what kind of LED strips you have. I'm guessing NeoPixels (WS2812)? (I've never used NeoPixels but I understand the basics of how they work.)

I think you need to understand exactly how the code/library works so you can control the LEDs any way you want.

What I'm having trouble with is having #1 and #2 light up at the same time as possibly two separate colors without the in between space being lit.

I'd cut the strip if there are LEDs you don't want to use.

If you cut the strip and you want them both to have the exact-same pattern you can simply connect the same data line to both strips. (Assuming NeoPixels).

Or, there should be an easy way to use two outputs to control the strips separately. (But, since I've never used the NeoPixel libraries I don't know if it's actually "easy".)

:stuck_out_tongue: Or, paint them black or cover them with tape. :stuck_out_tongue:

I have used WS2812Bs and the FastLED library, but I am confused by what he wants.

.

Thanks for your response :slight_smile:

I’m using a WS2812 and the Neopixel library. I’ll include my code, but I’m not sure how much it will help. As I said, I’ve just been goofing around with it to try to get the desired effect. It’s given me a better understanding of each variable in the theaterChase code (I should mention I’m pretty new to this, I’ve been researching and doing projects for about a month now).

I cannot cut my strips because I don’t have the means to solder them and I reuse these for different projects often. I’m fine covering them if need be, but me mentioning the gaps is mostly to illustrate my goal- two completely separate theaterChase patterns running on different sections of the led strip simultaneously, or at least as close to that as I can get.

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

#define PIN 7

Adafruit_NeoPixel strip = Adafruit_NeoPixel(300, PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  theaterChase(strip.Color(100, 100, 100), 50);
  theaterChase1(strip.Color(100, 0, 0), 50);
  theaterChaseRainbow(50);

}
  void theaterChase(uint32_t c, uint8_t wait) {
    for (int j = 0; j < 10; j++) { //do 10 cycles of chasing
      for (int q = 0; q < 3; q++) {
        for (uint16_t i = 0; i < 100; i = i + 5) {
          strip.setPixelColor(i + q, c);  //turn every third pixel on
        }
        strip.show();
        delay(wait);
        for (uint16_t i = 0; i < 100; i = i + 5) {
          strip.setPixelColor(i + q, 0);      //turn every third pixel off
        }
      }
    }
  }
    void theaterChase1(uint32_t c, uint8_t wait) {
    for (int j = 0; j < 10; j++) { //do 10 cycles of chasing
      for (int q = 0; q < 3; q++) {
        for (uint16_t i = 200; i < 300; i = i + 5) {
          strip.setPixelColor(i - q, c);  //turn every third pixel on
        }
        strip.show();
        delay(wait);
        for (uint16_t i = 200; i < 300; i = i + 5) {
          strip.setPixelColor(i - q, 0);      //turn every third pixel off
        }
      }
    }
  }
  void theaterChaseRainbow(uint8_t wait) {
    for (int j = 0; j < 256; j++) {   // cycle all 256 colors in the wheel
      for (int q = 0; q < 3; q++) {
        for (uint16_t i = 0; i < strip.numPixels(); i = i + 3) {
          strip.setPixelColor(i + q, Wheel( (i + j) % 255)); //turn every third pixel on
        }
        strip.show();
        delay(wait);
        for (uint16_t i = 0; i < strip.numPixels(); i = i + 3) {
          strip.setPixelColor(i + q, 0);      //turn every third pixel off
        }
      }
    }
  }
  uint32_t Wheel(byte WheelPos) {
    WheelPos = 255 - WheelPos;
    if (WheelPos < 85) {
      return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
    }
    if (WheelPos < 170) {
      WheelPos -= 85;
      return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
    }
    WheelPos -= 170;
    return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
  }