how aboutthe for command works if used in a separate function instead of being inside the void loop().when the if loop has i in the function reach 5 (no longer less than 5), it will return back to the void loop() and wait for another button press.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16