Coder Social home page Coder Social logo

sparkfun / sparkfun_mag3110_breakout_board_arduino_library Goto Github PK

View Code? Open in Web Editor NEW
20.0 7.0 13.0 314 KB

Arduino Library for the SparkFun Triple Axis Magnetometer Breakout - MAG3110

License: Other

C++ 100.00%
arduino-library sparkfun magnetometer

sparkfun_mag3110_breakout_board_arduino_library's Introduction

SparkFun MAG3110 Breakout Board Arduino Library

Arduino Library for the SparkFun Triple Axis Magnetometer Breakout - MAG3110

This library makes it easy for you to get started with the MAG3110 breakout board. It also has commands included for more advanced users that want to squeeze even more functionality out of the MAG3110.

You will also be able to calibrate the MAG3110 whenever necessary as shown in the example.

SparkFun MAG3110 Arduino Library

SparkFun MAG3110

SparkFun Triple Axis Magnetometer Breakout - MAG3110

Freescale’s MAG3110 is a small, low-power, digital 3-axis magnetometer. The device can be used in conjunction with a 3-axis accelerometer to produce orientation independent accurate compass heading information. It features a standard I2C serial interface output and smart embedded functions. It’s also a tiny QFN package which isn’t very easy to play with so here is our easy to use breakout board. This board breaks out all of the pins for the MAG3110 to a standard 0.1" header and also supplies the necessary filtering capacitors so that you can easily use it in your next navigation project.

This library includes functions that allow you to read your heading to magnetic north. Data from this is output on the range of -180 degrees to +180 degrees.

Repository Contents

  • /examples - Example sketches for the library (.ino). Run these from the Arduino IDE.
  • /src - Source files for the library (.cpp, .h).
  • library.properties - General library properties for the Arduino package manager.

Documentation

Products that use this Library

  • SparkFun Triple Axis Magnetometer Breakout - MAG3110 - SEN-12670 - MAG3110 is a small, low-power, digital 3-axis magnetometer. The device can be used in conjunction with a 3-axis accelerometer to produce orientation independent accurate compass heading information. It features a standard I2C serial interface output and smart embedded functions. It’s also a tiny QFN package which isn’t very easy to play with so here is our easy to use breakout board. This board breaks out all of the pins for the MAG3110 to a standard 0.1" header and also supplies the necessary filtering capacitors so that you can easily use it in your next navigation project.

Version History

  • 1.0.3 - Move Wire.begin() and unnecessary wait after Wire.requestFrom()
  • 1.0.2 - Update library properties version
  • 1.0.1 - Keyword Fix
  • 1.0.0 - Initial release of the Triple Axis Accelerometer Breakout - MAG3110 SparkFun Library.

License Information

This product is open source!

Please review the LICENSE.md file for license information.

If you have any questions or concerns on licensing, please contact [email protected].

Distributed as-is; no warranty is given.

  • Your friends at SparkFun. And George the contract author :)

sparkfun_mag3110_breakout_board_arduino_library's People

Contributors

bboyho avatar ductapemaster avatar nseidle avatar per1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sparkfun_mag3110_breakout_board_arduino_library's Issues

Getting extreme readings

Hi @sparkfun,

I'm using this module with an ESP-12 and I'm just running the Basic example. I'm getting very unusual readings. Here is a typical sample:

X: 64895, Y: 425, Z: 64768

What could this be? Have I got a damaged MAG3110? Is there a weird scale value register set somewhere? Any clues would be much appreciated.

EDIT: Upon further investigation - the MAG3110 has two 8-bit registers for each axis. In this library, they're joined and packaged into an int. Shouldn't they be packed into a uint16_t or an unsigned int? Surely there's no sign in the values the magnetometer will spit out. Could I be getting these values due to an overflow?

Unable to initialize

The initialize() function always return false. .dataReady() always return false as well, thus no readings can be made. If I try to read the values directly, the arduino seems to just hang.

Does anyone face the same issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.