Hi - i have a Mega controller and a single strand or Neopixel 60..what i would like to do though is to have 2 or 3 strands in parallel that are synchronized with each other.Can i do this with a single controller? or with one controller on different channels?
not sure if LED's are addressed differently in each strand or i need to do the sync in code somehow.
thanks
sync 2 or more strands of neopixel?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: sync 2 or more strands of neopixel?
You can do that. Connect each strip to a different output pin.
Declare an instance of the Adafruit_NeoPixel object for each strand. For example:
Now you can write the same thing to each strip:
You can also make an array of Adafruit_NeoPixel objects. See this thread:
http://forums.adafruit.com/viewtopic.ph ... it=+strips
Declare an instance of the Adafruit_NeoPixel object for each strand. For example:
Code: Select all
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(60, PIN1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(60, PIN2, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(60, PIN3, NEO_GRB + NEO_KHZ800);
Code: Select all
for(i=0; i< strip1.numPixels(); i++) {
strip1.setPixelColor(i, 0, 0, 255);
strip2.setPixelColor(i, 0, 0, 255);
strip3.setPixelColor(i, 0, 0, 255);
}
strip1.show();
strip2.show();
strip3.show();
http://forums.adafruit.com/viewtopic.ph ... it=+strips
Please be positive and constructive with your questions and comments.