Chapter 10. The Magnetic Compass Sensor

Introduction

The magnetic compass sensor is great to have if you want to get involved in navigation routines. It provides a magnetic compass bearing accurate to 2 degrees. The manufacturer's recommend that the sensor be mounted at some distance from sources of electromagnetic interference, such as electric motors. We decided to take it well out the range of the motors by mounting it on top of an upright mast (see Figure 10.1). This seems to have worked well.

Figure 10.1. Using a traditional magnetic compass, Daniel marks the working area with a large arrow pointing north. The TriBot mobile robot has a magnetic sensor mounted at the top of a tall mast. This is to keep it away from magnetic fields caused ...

Get Programming Lego Mindstorms NXT now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.