Ending a For Loop(s)

We cannot see your attempt at the if( ) ?

Do not use a for( ) loop, do not use delay( ).

Use a millis( ) TIMER for all delays. This allows you to do other things at the same time as animations.

Read this discussion: