Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Raspberry Pi Robotics Essentials

You're reading from  Raspberry Pi Robotics Essentials

Product type Book
Published in Jun 2015
Publisher
ISBN-13 9781785284847
Pages 158 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Richard Grimmett Richard Grimmett
Profile icon Richard Grimmett

Connecting a digital compass to the Raspberry Pi


One of the important pieces of information that might be useful for your robot, it if is going to plan its own path, is its direction of travel. So, let's learn how to hook up a digital compass to the Raspberry Pi.

There are several chips that provide digital compass capability; one of the most common is the HMC5883L 3-Axis Digital Compass chip. This chip is packaged onto a module by several companies, but almost all of them result in a similar interface. The following is a picture of one the GY-271 HMC5883L Triple Axis Compass Magnetometer Sensor Module, which is available from a number of online retailers:

This type of digital compass uses magnetic sensors to discover the earth's magnetic field. The output of these sensors is then made accessible to the outside world through a set of registers that allow the user to set things such as the sample rate, and continuous or single sampling. The x, y, and z directions are output-using registers...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}