Common library for the photopile project.