Arduino Project Log: Getting Started with a Digital Compass

Andrew ThumbAs I mentioned during the last Blue Pints episode, this year I’m going to be attempting to build a low-cost open source CTD for basic oceanographic measurements. This is in addition to my ongoing work with the OpenROV. I have a pretty solid electronics background, but in order to accomplish this goal, I also need to learn how to program microcontrollers, something that I’ve never done before. For the next several months I’m going to tackle various small Arduino project to get comfortable with the fundamentals. I’ll be working out of Environmental Monitoring with Arduino: Building Simple Devices to Collect Data About the World Around Us and Arduino Projects to Save the World, both of which feature beginner to advanced projects based around environmental monitoring and data collection, as well as Programming Arduino Getting Started with Sketches for as a basic programming primer.

For my first project, I wanted to start with something that could eventually be implemented with the OpenROV–a magnetometer to provide compass headings while navigating the robot. As a first step, I wanted to learn how to program the Arduino board to calculate compass headings from a magnetometer and develop some sort of rough visual readout of that heading.

Read More