here is a link
where it says to use
#if defined(ARDUINO) && ARDUINO >= 100
if your library A includes library B for functionality.
in your .pde/.ino you need to #include both library A and B
//Move your code into a class
//Client stuff here
MyLib( int some_init_value_if_needed ) //Class constructor
void DoStuff( void ) //Functionality
//Derived type stuff here
//Local private data/functions here
If you need to keep state info you can use variables in the class like int i_Mydata;
If you only have a set of discrete functions, with no state info required to be kept. use a class with non-member functions
static void DoSomething( void )
static void DoSomethingElse( void )
//Then all you do to use the functions is
This is good for keeping related functionality together
Have a look in the library’s you already have, they use .h and .cpp files to create a library.
The easiest way is to create a .h in your sketch directory and plonk all functions straight in there, make them inline to prevent multiple definition errors. Or have the function prototypes in the header and in a .cpp that includes the .h, add the actual function code.
This isn’t really a library though, it just moves functionality into a different location. Classes are the better approach.