Timeline for How to use variables and functions across multiple .ino files
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 23, 2017 at 10:49 | comment | added | gilhad | And anything longer then few lines means better editor than Arduino IDE. (I use VIM for example.) | |
May 23, 2017 at 10:46 | comment | added | gilhad | Yes, I think, that if I cannot see all relevant code on one (max two) screens, then something is probably wrong. The question is, what is wrong - and so the answers differs. If there are repeated parts, the answer is probably function. If there are lot of functions for one periferial/protocol, the answer is library for this. If the problem is just complicated, so if have a lot of code and functions, there is folding each function and then folding each group of folded functions. So my usual program includes lot of libraries and all functions are folded and main loop/ifs too. | |
May 23, 2017 at 10:17 | comment | added | frarugi87 | Of course.. Even if I usually tend to split (bigger) programs in smaller chunks (for instance, one file for the main loop, one for one of the peripherals, one for the interface, ...) | |
May 23, 2017 at 10:15 | comment | added | gilhad | Ok, this shifted it somewhere else, but still I think it may be relevant to his intent - why he wants to separate the two files - using secondary files to be merged together by some IDE hack while he wants emulate how library do function is not the best approach, if he can use libraries as well | |
May 23, 2017 at 10:07 | comment | added | frarugi87 | Now that the OP clarified the question, this is not the correct answer. He has two "tabs" open, meaning he has two source files for the same program | |
May 23, 2017 at 8:47 | history | answered | gilhad | CC BY-SA 3.0 |