hi, im trying to get this led strip to fade up and down while switching colors. im trying to program 2 colors at once inside a for loop and its not working. it fades up n down to blue but then i nest a for loop inside another for loop so i can change 2 parameters of the RGB and it switches to the color but doesnt fade into it slowly. it actually will flash to pure green first then fades into its set color: a cool blue, mix of green n blue that i set. so it seems like it is fading but not how I intended. can someone help me understand this?
everything works but the last for loop is screwy when i try to fade a mikx of B and G. (j and z)
void loop() {
for( int j = 0; j < 200; j++) {
for (int i = 0; i < NUM_LEDS; i++) {
//blue
leds[i] = CRGB(0,0,j);
}
FastLED.show();
delay(20);
}
for(int j = 200; j > 0; j--) {
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB(0,0,j);
}
FastLED.show();
delay(20);
}
for(int j = 0; j < 200; j++) {
for(int z = 0; z < 200; z++){ //---My line I added to try changing G and B colors at the same time
for(int i = 0; i < NUM_LEDS; i++){
leds[i]=CRGB(0,z,j);
}
}
FastLED.show();
delay(30);
}
}