Adding some test code to support the compass sensor.