user18611: I would like to create a program with separated modules, is this this possible using Arduino IDE?

user19016: Arduino sketches can include Libraries (see https://www.arduino.cc/en/Guide/Libraries). 
In order to work with the Arduino IDE, such a library is required to adhere to a certain folder structure and naming convention (as described in the above guide). 
Other than that, it's similar to modularized code in any other language. The canonical language in Arduino libraries is C++. 
Since a regular Arduino IDE installation already comes preinstalled with a multitude of libraries, you can take a look and go from there.
I recommend that you look through the example sketches (from the "Examples" menu option). Whenever you see an #include statement at the top of the sketch, you have a hint where to look next in order to gain a better understanding about the inner works. 

user19090: While you can create your own libraries for the Arduino, a simple way to make reusable code is to create a header (.h) file that contains the code you would like to make reusable.
Specifically, in the Arduino IDE create a new tab with some name foo.h, and in your main tab, add #include "foo.h" at the top of your code. What this does is essentially copy paste the code from foo.h into your code during the build process. While simple in execution, it really helps organize more complex code, and in your case, helps with reusing code.
You can alternativly use "Normal Arduino code files (no visible extension), C files (.c extension), C++ files (.cpp), or header files (.h)."
And one extra note to help you - the header files do not have access to some of the typical Arduino commands and functionality, such as delay() or Serial unless you add #include "Arduino.h". However, for IDE versions less than 1.0, use #include "WProgram.h". This will give you access to those functions.

18611: <p>I would like to create a program with separated modules, is this this possible using Arduino IDE?</p>
 19016: <p>Arduino sketches can include Libraries (see <a href="https://www.arduino.cc/en/Guide/Libraries" rel="nofollow">https://www.arduino.cc/en/Guide/Libraries</a>). </p>

<p>In order to work with the Arduino IDE, such a library is required to adhere to a certain folder structure and naming convention (as described in the above guide). </p>

<p>Other than that, it's similar to modularized code in any other language. The canonical language in Arduino libraries is C++. </p>

<p>Since a regular Arduino IDE installation already comes preinstalled with a multitude of libraries, you can take a look and go from there.</p>

<p>I recommend that you look through the example sketches (from the "Examples" menu option). Whenever you see an #include statement at the top of the sketch, you have a hint where to look next in order to gain a better understanding about the inner works. </p>
 19090: <p>While you can create your own libraries for the Arduino, a simple way to make reusable code is to create a header (.h) file that contains the code you would like to make reusable.</p>

<p>Specifically, in the Arduino IDE <a href="https://www.arduino.cc/en/Guide/Environment#toc8" rel="nofollow">create a new tab</a> with some name <code>foo.h</code>, and in your main tab, add <code>#include "foo.h"</code> at the top of your code. What this does is essentially copy paste the code from <code>foo.h</code> into your code during the <a href="https://www.arduino.cc/en/Hacking/BuildProcess" rel="nofollow">build process</a>. While simple in execution, it really helps organize more complex code, and in your case, helps with reusing code.</p>

<p>You can alternativly use "Normal Arduino code files (no visible extension), C files (.c extension), C++ files (.cpp), or header files (.h)."</p>

<p>And one extra note to help you - the header files do not have access to some of the typical Arduino commands and functionality, such as <code>delay()</code> or <code>Serial</code> unless you add <code>#include "Arduino.h"</code>. However, for IDE versions less than 1.0, use <code>#include "WProgram.h"</code>. This will give you access to those functions.</p>
