Need help writing more efficient code (total newbie)

Hello and welcome :slight_smile:

Where is i declared?

And, it may be ugly, yet it's most efficient this way, than using for loops.

You can still use #define instead of const int, to save little program memory :slight_smile: