Easy Method Of Splitting files?

Hello, I am wring a C++ program, and have gotten to a point where the file is large (to me) and it takes a while to scroll through it to edit parts while i’m working on it.

So, i was hoping there was an easy way to split the file up into smaller sections. I was reading something about refactoring, but that seems like a lot of work… and more than what i need.

I’ve attached my file.

What i’d really like to do is take the stuff that handles interface (checking for buttons, lighting buttons, ect) but that into one file, then take the code that assigns zones functions and put that into another file, then put on the functions that make up the color functions into another file.

But i’m a bit stuck.

_6803_LED_box2_4.ino (36.1 KB)

This looks very memory hungry. Does it run?

If you split your large .ino file into several smaller .ino files and put them all in the same folder they will show up as separate tabs in the IDE. You can create new .ino files from inside the IDE using the drop-down menu on the arrow at the top right.

KenF: This looks very memory hungry. Does it run?

Yes, im running it on a mega. It uses half the available memory, but a lot of those arrays are going away, so that should cut down on the memory usage.

KenF: This looks very memory hungry. Does it run?

but this is my first C++ program i've ever written, so if there is something I can do to be more efficient, i'm all ears :)

UKHeliBob: If you split your large .ino file into several smaller .ino files and put them all in the same folder they will show up as separate tabs in the IDE. You can create new .ino files from inside the IDE using the drop-down menu on the arrow at the top right.

Thank you, that should make my life easier.