A compass module that is intended for robotic applications as an aid to navigation, but suitable for similar applications.
- Produces a unique number to represent an orientational direction
- Two Philips KMZ512 magnetic field sensors (which are sensitive enough to detect the Earth's magnetic field) are mounted at right angles to compute the direction of the horizontal component of the Earth's magnetic field
- The output bearing can be obtained from a PWM signal on pin 4 or via the I²C bus on pins 2 and 3
- The PWM signal is a pulse width modulated signal with the positive width of the pulse representing the angle
- The pulse width varies from 1ms (0°) to 36.99ms (359.9°) – that is 100µs/° with a +1ms offset