Tabs in the IDE


I was a bit confused how tabs work in the IDE so I did a bit of testing. Could someone please confirm my findings?

You can create new tabs with the right arrow. This creates a new file inside the project directory. Or you can use 'Add file...' which will create a copy of an existing file in the directory.

All files are compiled together into one program.

The main use as I see it is to clean up the 'main' tab. Functions can be grouped together in their own tabs ('digital IO', 'serial IO',...) and be called from the loop().

Am I right? Did I miss something?


Sounds pretty accurate to me. One other (advanced) use of the tabs is to include straight C/C++ files in your sketch. If you give a tab a .c, .cpp, or .h extension, it will be compiled as is, without the small bit of preprocessing that's done to the main sketch file (and other tabs with no extension). You can read more about the gory details here: