O'Reilly logo

Programming Lego Mindstorms NXT by Owen Bishop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required