Hoping this is a quick one. I have two Neo rings setup (a 24 ring and a 16 ring) and I'm trying to do separate colors with a slight fade effect on each of them on execution. When I do I keep getting the same colors even when I change the values differently in the HSV.
void playAnimation2() {
int position = 0;
unsigned long timer = millis();
timer = millis();
position = 0;
while (millis() - timer < 5000) {
for (int i = 0; i < CNT; i++)
strip.setPixelColor((i + position) % (CNT + CNT1), getPixelColorHsv(i, i * (MAXHUE / (CNT + CNT1)), 200, 70));
for (int i = CNT; i < CNT + CNT1; i++)
strip.setPixelColor((i + position) % (CNT + CNT1), getPixelColorHsv(i, i * (MAXHUE / (CNT + CNT1)), 100, 70));
strip.show();
strip.show();
position++;
position %= (CNT + CNT1);
delay(50);
for (int x = 0; x < 10; x++) { //fading
for (int i = 0; i < CNT; i++)
strip.setPixelColor((i + position) % (CNT + CNT1), getPixelColorHsv(i, i * (MAXHUE / (CNT + CNT1)), 200, 70 - x));
for (int i = CNT; i < CNT + CNT1; i++) //Execute for total number of leds
strip.setPixelColor((i + position) % (CNT + CNT1), getPixelColorHsv(i, i * (MAXHUE / (CNT + CNT1)), 200, 70 - x));
strip.show();
position++;
position %= (CNT + CNT1);
delay(50);
}
for (int i = 0; i < CNT + CNT1; i++)
strip.setPixelColor(i, strip.Color( 0, 0, 0)); //Set pixel color off
strip.show();
}
Can anyone help? Thanks in advance!