I have a question about the best way to post an Arduino sketch to this forum when the sketch has been divided into multiple “Tab”s within the Arduino IDE. At this time, my question is theoretical without a specific sketch in mind.
How many tabs?
Maybe post each tab as its own code section?
I usually have at least 2 additional tabs when I use them. One tab for Serial Debug and one tab for the functions of the main loop are my starting point. Display functions get a dedicated tab if there are more than one. The main tab contains only the things required to be there. My loop function only contains function calls. This allows me to use shorter walls of text and quickly find the relevant code when editing the sketch months or years later.
Having seen some help requests on this forum, seeing how important the actual sketch in use is to the helpers, and seeing a few lengthy sketches; I am curious about how tabbed sketches are handled on this forum.
Properly formatted, each tab will be a small, scrolling-box of code. Not big at all.
As already mentioned, the preferred way is to show each file in its own code block. You need to provide the file names for each code block so the sketch can be reproduced. Be aware of the limit of 120,000 characters per post so if it's really big you might have to split it over multiple replies.
Personally I do not have too many problems with zip-files; it's far more convenient to download a zipped project than to copy 20 or 30 code blocks. Be aware that users might use a cell-phone and can't help you if you attach files (zip or ino or ...).
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.