Lost + Found QMC5883L 3-Axis Magnetometer driver library for Raspberry Pi Pico C SDK
  • C 80.3%
  • Python 12.5%
  • CMake 7.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-05 09:55:05 -07:00
include Initial commit 2026-08-05 09:55:05 -07:00
src Initial commit 2026-08-05 09:55:05 -07:00
CMakeLists.txt Initial commit 2026-08-05 09:55:05 -07:00
conanfile.py Initial commit 2026-08-05 09:55:05 -07:00
README.md Initial commit 2026-08-05 09:55:05 -07:00

lf-qmc5883l

Lost + Found QMC5883L 3-Axis Magnetometer driver library for Raspberry Pi Pico C SDK.

🔌 Hardware Setup

Standard Pin Mapping:

  • SDA: GP4 (Pico Pin 6)
  • SCL: GP5 (Pico Pin 7)
  • Bus: I2C0

📦 Usage

Add this package to your conanfile.txt or CMake setup.

CMake Integration

target_link_libraries(your_project PUBLIC lf-qmc5883l)

Driver Instantiation

#include "lf_qmc5883l.h"

lf_qmc5883l_t qmc;

// Initialize
if (lf_qmc5883l_init(&qmc, i2c0, LF_QMC5883L_DEFAULT_I2C_ADDR)) {
    // Successfully initialized!
}

// Read telemetry
float mx, my, mz;
if (lf_qmc5883l_read_data(&qmc, &mx, &my, &mz)) {
    printf("Magnetic Field: X=%.2f, Y=%.2f, Z=%.2f uT\n", mx, my, mz);
}