Need some info about tabs in the Arduino IDE

You're welcome. I think tabs are a very useful feature of the Arduino IDE.

There is one other aspect of tabs I didn't mention above because I thought it might confuse the discussion. My previous reply only talked about having multiple .ino files in a sketch. However, you can put other types of code files into a sketch, and these will also be shown as tabs:

  • .h - header files, usually used for declarations
  • .cpp - compiled as C++ programming language
  • .c - compiled as C programming language
  • .S - compiled as assembly programming language

These files are not concatenated to your .ino files. They are simply passed to the compiler as-is, without any modification at all. They are not standalone programs though. They still become part of the same program as your .ino files, just not part of the same text file. It's essentially just like an Arduino library, only only accessible from the sketch they are in and displayed for editing in the Arduino IDE.

This is useful in the case where you want to use pure C++/C/assembly. Even though the Arduino programming language is a superset of C++, meaning that any valid C++ is valid Arduino language, and C++ is for the most part a superset of C, and you can do inline assembly language in any of those languages, some people don't want the minor additional convenience features of the Arduino programming language. Using non-.ino files in the sketch allows them to avoid those features.

I personally haven't found the need for this (though I have done a little bit of tinkering around with pure assembly in sketches solely for the sake of learning about it), but I think it's really cool that the Arduino development software has this flexibility.