Arduino library for I/O, implemented using C++ templates