My current project has grown rather large so I’ve recently started using tabs. So far I’ve just added several containing types of functions, like Buttons, LEDs, RTC, LCD, etc. A useful alternative to Find for locating code. Is that a common way of using tabs? Any tips would be appreciated.
One specific question: what is the usual procedure when a project is finished? Presumably just leave them and save? See no way to close them?
The "Standard Arduino" technique of using multiple .ino files on multiple tabs doesn't provide true modularity.
IMO, if you're going to the trouble of creating multiple tabs, you might as well create a proper, modular structure using .cpp / .h files. See My Post #5 Here.
That is certainly a common way to use tabs but personally I prefer to have most, if not all code in a single file
IDE 2 allows you to peek at function definitions or jump to them wherever they are located even if they are in a library and the same goes for variable declarations
At the end of the day it is a personal choice
As a matter of interest, what type of file do you put your functions in ? I assume that they are in .ino files
Thanks, but that still looks way above my skill level! I think of .cpp and .h files as 'under the bonnet' stuff, and assume the libraries I include in my sketch take care of them, leaving me grateful that I don't need to.
Definitely, as you may see from my reply to @gfvalvo a minute ago!
BTW, I've just had an error message from a sketch to which I've added a couple more tabs. Pretty sure I did no more than accurately copy/paste but presumably not... Now to figure out what went wrong. I'm inclined to start by restoring the full sketch...
Maybe the Arduino builder dropped a stitch; it does make mistakes. That would be absolutely sufficient reason to go for @gfvalvo 's approach.
You can find what is created by the builder by enabling verbose output during compilation in file → preferences. It will give you a directory and in that directory you will find yourSketch.ino.cpp that you can open with a text editor.