Hello, I am not famliar with professional coding process. Yet I currently have a housekeeping Arduino and a 'barn-keeping' one. Much of the code is the same and I found out that working on two different code (.ino) files is not the way to go.
So I made a library and am inserting all the globals and many of the functions in a .h file in a the library. In this file there are # idef home and # ifdef barn e.g. for most the pin assignments. In the .ino file I put at the beginning #define home or #define barn. In this way whenever I correct something in a function I don't need to do it twice.
I am noticing that the compiler requests that the function in the .h be organized it call order which was not the case when the functions was in the .ino file and It's a bit annoying: is there a way to avoid that?
Is there a better way to properly merge these two projects?
Thanks a lot for you time!