I think our team used
this compass for some testing. Coincidentally, this compass is ready to use with the WPILib and easyC (gotta use the usercode block though). It will give you values between 0-360 degrees, in correlation to magnetic north. The documentation for
WPILib says that its very important to watch out for the robot's motors, as they will of course create a magnetic field larger than the earth's field.