user23023: I'd like to know if it's possible to create a library for Arduino that does not contain a class, just functions.
I know how to create a library with a class, but I'd like to create a library of general purpose functions that don't need to be instantiated to be used. Just used like the standard functions included in the Arduino IDE:  sizeof(), etc..
Is this possible?  If so, can anyone point me in the direction of a template?  I've been searching, but haven't found anything.
Thanks!

user4143: Yes, it's possible.
Just don't make a class. Just make functions instead.
Like a class-based one, have a .cpp and a .h file. In the .cpp file (or .c file if you don't want any of the C++ functionality or 90% of the Arduino API available to you) place your functions.
In the .h file place prototypes for them. I am in the habit of adding the extern keyword, but you don't actually need to for functions.
For example:
foo.cpp:

void doSomething() {
    // whatever
}

foo.h:

extern void doSomething();

Then you can include your .h file and call your functions:
#include <foo.h>

// ...

doSomething();


23023: <p>I'd like to know if it's possible to create a library for Arduino that does not contain a class, just functions.</p>

<p>I know how to create a library with a class, but I'd like to create a library of general purpose functions that don't need to be instantiated to be used. Just used like the standard functions included in the Arduino IDE:  sizeof(), etc..</p>

<p>Is this possible?  If so, can anyone point me in the direction of a template?  I've been searching, but haven't found anything.</p>

<p>Thanks!</p>
 4143: <p>Yes, it's possible.</p>

<p>Just don't make a class. Just make functions instead.</p>

<p>Like a class-based one, have a <code>.cpp</code> and a <code>.h</code> file. In the <code>.cpp</code> file (or <code>.c</code> file if you don't want any of the C++ functionality or 90% of the Arduino API available to you) place your functions.</p>

<p>In the <code>.h</code> file place prototypes for them. I am in the habit of adding the <code>extern</code> keyword, but you don't actually need to for functions.</p>

<p>For example:</p>

<pre><code>foo.cpp:

void doSomething() {
    // whatever
}

foo.h:

extern void doSomething();
</code></pre>

<p>Then you can include your <code>.h</code> file and call your functions:</p>

<pre><code>#include &lt;foo.h&gt;

// ...

doSomething();
</code></pre>
