I have a question about how tabs work in the arduino ide. I am trying to clean up my main code by moving close to 200 lines of #defines and some longwinded functions to another tab. #defines on the second tab are not seen in the first (main) tab upon compiling resulting in an error. Do #defines have to be at the top of the main tab? Anything else to note about tabs? It is my understanding that multiple tabs are just copied into the main one upon compile time. Is this correct?
Take a look at this page:
Basically, it depends on the file extension you used for the tabs. If you use a .h or .cpp extension it will get compiled separately rather than inserted into the main sketch.