Hi everyone,
I'm trying to control three noepixel strips of 6 pixels length each. I'm wiring each Din to its own arduino pin (D6,D5,D3) and power like the sketch below
5v batt ........| ......gnd batt......|
5v pin strips /|\ gnd pin strips /|
The issue that I'm having is that once I load the only one strips responds to the code and the other ones are one even if I set those pin unassigned
This is the code I'm using for testing.
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino 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 strip1 = Adafruit_NeoPixel(9, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(13, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip3 = Adafruit_NeoPixel(10, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip1.begin();
strip2.begin();
strip3.begin();
}
void loop(){
// Some example procedures showing how to display to the pixels:
colorWipe(strip1.Color(255, 0, 0), 50); // Red
colorWipe(strip1.Color(0, 255, 0), 50); // Green
colorWipe(strip1.Color(0, 0, 255), 50); // Blue\\
colorWipe(strip2.Color(255, 0, 0), 50); // Red
colorWipe(strip2.Color(0, 255, 0), 50); // Green
colorWipe(strip2.Color(0, 0, 255), 50); // Blue
colorWipe(strip3.Color(255, 0, 0), 50); // Red
colorWipe(strip3.Color(0, 255, 0), 50); // Green
colorWipe(strip3.Color(0, 0, 255), 50); // Blue
}
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);
}
for(uint16_t i=0; i<strip2.numPixels(); i++) {
strip2.setPixelColor(i, c);
strip2.show();
delay(wait);
}
for(uint16_t i=0; i<strip3.numPixels(); i++) {
strip3.setPixelColor(i, c);
strip3.show();
delay(wait);
}
}
I'm looking forward to your input
thank you