'Arduino project layout
I'm working on my first Arduino project, a big part of which is using existing code and modifying it to suit my needs. The existing code is split up into multiple (7) .ino files and I'm having trouble understanding the rationale behind this. Having multiple files all sharing the same namespace seems almost pointless, because all you that seems to be happening is unintentional obfuscation of program flow. At least with one file its easy to search to find the function being called.
My question is: what is best practice regarding Arduino project organisation? I'm very tempted to rewrite much of the auxiliary .ino files in c++ so that I can namespace them in the Arduino main .ino file.
Solution 1:[1]
The best organization always depends on the project. IMHO file layout is not that important. It is more important to learn about version control (e.g. GIT) and make or scons.
With regard to the file layout it mostly depends on the size of the project. It also depends if you intend to introduce reusable pieces of code that shall be reused elsewhere. In the end you have the same options as with any C++ project.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Udo Klein |
