User avatar
Posts: 19
Joined: Mon Dec 14, 2015 8:45 am
Contact: Website

Python driver for the GY-273 QMC5883L 3-Axis Magnetic Sensor

Sun Oct 14, 2018 10:55 pm

Someone is selling the QMC5883L chip stating that it is compatible with the HMC5883L, it seems that it is not!
After trying several pieces of code found on the net, nothing was working on my Raspberry Pi, running Raspbian Stretch and a QMC5883L breakout labeled GY-273.
So I got the Datasheet and I wrote a little Python driver wichi is working quite well for me. You can find it here:
A very basic usage example is:

Code: Select all

import time
import py_qmc5883l
sensor = py_qmc5883l.QMC5883L()
while True:
    print sensor.get_magnet()

Return to “Automation, sensing and robotics”