Skip to content
forked from dthain/QMC5883L

Driver for QMC5883L chip found in many GY-271 boards.

Notifications You must be signed in to change notification settings

j-eyking/QMC5883L

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

These are a bit modified versions of dthain's QMC5883L.cpp and QMC5883L.h so they can be interchanged with jarzebski's HMC5883L.cpp and HMC5883L.h. This allows the use of a GY-271 breakout board (and a MPU6500/6050) to get the tilt compensated compass working (https://github.com/jarzebski/Arduino-HMC5883L/blob/master/HMC5883L_compensation_MPU6050/HMC5883L_compensation_MPU6050.ino).

In the mentioned above .ino, change

#include <HMC5883L.h>
HMC5883L compass;

to

#include <QMC5883L.h>
QMC5883L compass;

comment the lines for initializing the HMC5883L except the compass.setOffset, and replace them by

compass.init();

Put the values for offX and offY you've found with HMC5883L_calibrate.ino in the line to set the x- and y-offset, like:

compass.setOffset(-10, -850);

About

Driver for QMC5883L chip found in many GY-271 boards.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%