It may not help, but http://www.parallax.com/ has a compass module. The documentation is normally pretty good.