Hello,
I am part of a team, we are currently working on a rather big project. I've attached some photos as wall as circuit diagramms so you can understand it better. We are building a LED "sky" out of 50 LED strips, 750 single LEDs. There are two options for wiring the data cable:
a)We are planning to have a single data wire to each of the LED strips.
1.As you can see in the skecht below, we want to run for example a color Wipe on all the strips the same time. So I need a comman/way to say: colorWipe(strip1 to 50.Color(255, 0, 0), 50); instead of as seen in the sketch.
And can I use this command also here: Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(15, PIN1, NEO_GRB + NEO_KHZ800);
b)Or if this is a better option we want to connect one bar of LED strips(would be 12 strips) with one wire. But I dont really know if the commands would still work as the programm see would see the 12 strips as on strip.
2.So is there are way to run a effect like colorWipe on 12 strips simultaneously, if the sketch thinks its just one big strip?
Here is the sketch:
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN1 7
#define PIN2 6
//and so on until 50
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(15, PIN1, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(15, PIN2, NEO_GRB + NEO_KHZ800);
//and so on until 50
void setup() {
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
strip1.begin();
strip1.setBrightness(200);
strip1.show();
strip2.begin();
strip2.setBrightness(200);
strip2.show();
//and so on until 50?
}
void loop() {
colorWipe(strip1.Color(255, 0, 0), 50); // Red
colorWipe(strip1.Color(0, 255, 0), 50); // Green
colorWipe(strip1.Color(0, 0, 255), 50); // Blue
strip1.show();
theaterChase(strip2.Color(127, 127, 127), 50); // White
theaterChase(strip2.Color(127, 0, 0), 50); // Red
theaterChase(strip2.Color(0, 0, 127), 50); // Blue
strip2.show();
}
void colorWipe(uint32_t c, uint8_t wait) {
for (uint16_t i = 0; i < strip1.numPixels(); i++) {
strip1.setPixelColor(i, c);
strip1.show();
delay(wait);
}
}
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 < strip2.numPixels(); i = i + 3) {
strip2.setPixelColor(i + q, c); //turn every third pixel on
}
strip2.show();
delay(wait);
for (uint16_t i = 0; i < strip2.numPixels(); i = i + 3) {
strip2.setPixelColor(i + q, 0); //turn every third pixel off
}
}
}
}
//Theatre-style crawling lights with rainbow effect
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if (WheelPos < 85) {
return strip2.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if (WheelPos < 170) {
WheelPos -= 85;
return strip2.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip2.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
I hope some of you have got some answers, thank you for your help!
Andi