AlashCompass

Easy magnetic compass library for QMC5883L, HMC5883L and QMC5883P (GY-271): heading 0-360, compass direction in words, rotation calibration. No dependencies.

Author
Alash Electronics
Maintainer
Alash engineering
Website
https://github.com/Alash-electronics/AlashCompass
Category
Sensors
License
MIT
Library Type
Contributed
Architectures
Any

Reads the GY-271 compass over I2C with a one-line begin(): tells QMC5883L from HMC5883L by itself, gives heading(), direction in words (North, South-west) in Russian, Kazakh or English, calibrates the hard-iron and soft-iron error by rotating the board, applies magnetic declination, smooths readings and warns about strong magnets or motors nearby. Needs only the built-in Wire library. Examples included, made for classes, robots and kits by Alash Electronics.

Downloads

Filename Release Date File Size
AlashCompass-1.1.0.zip 2026-11-02 33.58 KiB
AlashCompass-1.0.1.zip 2026-11-02 31.43 KiB
AlashCompass-1.0.0.zip 2026-11-01 29.98 KiB