I'm trying to figure out a way to make an entire NeoPixel ring pulse in sync.
As far as I can tell there's no simple way in Arduino to address multiple pixels in the ring to display at the same time, the closest I can get is having them follow around the ring.
This is the generic form of the pulse I'm trying to apply to all of the pixels simultaneously:
int pulsefunction(int p){
strip.setPixelColor(0, 255, 0, 0);
strip.show();
delay (250);
strip.setPixelColor(0, 191, 0, 0);
strip.show();
delay (250);
strip.setPixelColor(0, 127, 0, 0);
strip.show();
delay (250);
strip.setPixelColor(0, 63, 0, 0);
strip.show();
delay (250);
strip.setPixelColor(0, 127, 0, 0);
strip.show();
delay (250);
strip.setPixelColor(0, 191, 0, 0);
strip.show();
delay (250);
}
Simultaneously Display on Multiple NeoPixels
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Simultaneously Display on Multiple NeoPixels
You are setting only one pixel with this code You need a loop around that like (not real code)
Code: Select all
strip.setPixelColor(0, 255, 0, 0);
Code: Select all
for(i, i<numpixels, i++) {
strip.setPixelColor(i, 255, 0, 0);
}
strip.show();
Please be positive and constructive with your questions and comments.