Thx. I’ve done that but the problem is that brighten() just goes on and on fades in and the fades in again. I need it to fade in once and stop on full blue until “else” happens
Thanks for both of your antagonistic replies alto.
If anyone can help me figure out how to have that simple fade stop on full blue once it fades up, I'll appreciate it.
I explained well what I wanted but again here it is for those who had the same problem of alto: I need the fade to blue to stop on full blue once it fades, instead of continuing a loop on fade up.
That stop at blue from the fade is the only thing I need help on right now. The additional code is not necessary. I just need to figure out how to get that fade to stop on blue- period.
No, it doesn't work. What Grumpy_Mike is suggesting is an alternative of an if/else statement.
This boolean suggestion is still calling brighten() which is the function that I need to figure out how to STOP its continuous fade in looping once it reaches full blue.
If anyone has a constructive/positive suggestion to this matter please reply.
So what you do when a suggestion doesn't work is that you post ALL your latest code and say what it does and what you wanted to do. Who knows you might have misunderstood what I said. If so we can show you where where you went wrong.
Thanks much runaway_pancake!
Your code certainly clarifies the boolean approach and does keep the blue static - however, the strip doesn't fade in unison, it illuminates pixel by pixel across the ring. The full code, which I've already shared, has this same function but differently, taken from the Examples of the strandtest. This is it:
void brighten()
{
uint16_t i, j;
for (j = 0; j < 255; j++)
{
for (i = 0; i < strip.numPixels(); i++)
{
strip.setPixelColor(i, 0, 0, j);
strip.show();
delay(10);
}
}
Serial.println ("Done");
}
Because that is how it is written. After setting the value of each pixel you show it and then delay. If you want to fade all the LEDs at once only do the show call when the for loop has finished.