user53000: I am working on a very long code that requires multiple functions defined. I want to split the code into two files as main code ("Feeder_Control" in the screenshot) and functions ("connections" in the screenshot) How to import the second file into main code to use its functions?
PS: In C/C++ same thing is done with #include "connections.h". How is it done in Arduino IDE.
.

user26916: There is no need to use an #include directive for the additional .ino file.
Before compilation starts, the Arduino IDE concatenates all .ino files in your sketch into a single file, starting with the .ino file that matches the sketch folder name, followed by the rest of the .ino files in alphabetical order. So there is no difference between one massive .ino file and breaking the same code among multiple .ino files, other than the greater ease of navigating the code via tabs. After a bit more processing, this file is compiled as C++.
Reference:
https://arduino.github.io/arduino-cli/latest/sketch-build-process/#pre-processing

53000: <p>I am working on a very long code that requires multiple functions defined. I want to split the code into two files as main code ("Feeder_Control" in the screenshot) and functions ("connections" in the screenshot) How to import the second file into main code to use its functions?</p>

<p>PS: In C/C++ same thing is done with #include "connections.h". How is it done in Arduino IDE.</p>

<p><a href="https://i.stack.imgur.com/jV5ue.png" rel="noreferrer"><img src="https://i.stack.imgur.com/jV5ue.png" alt="look here"></a>.</p>
 26916: <p>There is no need to use an <code>#include</code> directive for the additional .ino file.</p>
<p>Before compilation starts, the Arduino IDE concatenates all .ino files in your sketch into a single file, starting with the .ino file that matches the sketch folder name, followed by the rest of the .ino files in alphabetical order. So there is no difference between one massive .ino file and breaking the same code among multiple .ino files, other than the greater ease of navigating the code via tabs. After a bit more processing, this file is compiled as C++.</p>
<p>Reference:
<a href="https://arduino.github.io/arduino-cli/latest/sketch-build-process/#pre-processing" rel="noreferrer">https://arduino.github.io/arduino-cli/latest/sketch-build-process/#pre-processing</a></p>
