Create a library without a class?
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 &lt;foo.h&gt;

// ...

doSomething();