AKMF is a project mainly written in C, it's free.
Open source version of akmd (sensor daemon) for HTC Hero
This is the open source version of AKMD (sensor daemon) for HTC Hero.
This version (AKMF) has exactly the same ioctl footprint with that of AKMD. In addition to its compatability, this version also lets external calibration parameters to be used inside the daemon.