Creating libraries for Arduino
The compiler supports the #include
directive, you can write your library, then #include
it. This is expanded on in this tutorial about writing libraries for the Arduino.
For testing you can use ArduinoUnit. This itself is a library - so take a look at the source code (in the download) if you need inspiration.